0
How to resolve this error?
#include <stdio.h> int main() { int x = 10, y = 12; char * a; a = &x; x = 1xab; printf("%d%d", x, * a); return 0; } And please explain the reason of error too
2 Respuestas
+ 1
x = 1xab;
This is not a valid syntactically. I'm not sure what you expected out of this.
a = &x;
You are assigning an address that points to a incompatible data type. Char pointer here can only point to a one byte data, while the data itself is int (commonly four bytes data).
+ 2
You not define
Variable ----> b
Are you multiply in
x = 1xab or 1*a*b