某程序中有整形变量
a=0x8eb5f7bf, b=0xe4f5430b, c=0x21749c01, d=0xe4206f3b。
程序代码中有如下语句:
b=&a;
d=&c;
a=a+0xca393be9;
*d=*b
则此时语句 printf(“c=%d\n”, c); 给出结果为?(十进制)
b=&a;
d=&c;
*d=*b;
是错误代码
编译器报错
/tmp/715475149/main.c:8:2: warning: incompatible pointer to integer conversion assigning to 'int' from 'int *'; remove & [-Wint-conversion]
b=&a;
^~~
/tmp/715475149/main.c:9:2: warning: incompatible pointer to integer conversion assigning to 'int' from 'int *'; remove & [-Wint-conversion]
d=&c;
^~~
/tmp/715475149/main.c:11:1: error: indirection requires pointer operand ('int' invalid)
*d=*b;
^~
/tmp/715475149/main.c:11:4: error: indirection requires pointer operand ('int' invalid)
*d=*b;
^~
/tmp/715475149/main.c:12:11: error: non-ASCII characters are not allowed outside of literals and identifiers
printf(“c=%d\n”, c);
^
/tmp/715475149/main.c:12:16: error: expected expression
printf(“c=%d\n”, c);
^
/tmp/715475149/main.c:12:20: error: non-ASCII characters are not allowed outside of literals and identifiers
printf(“c=%d\n”, c);
^
2 warnings and 5 errors generated.
exit status 1