来找错啊!!
int b = 3;int *result = b;
int t = result;
printf("%d\n",t);
//我的指针是指向b的,那么result应该存储的是b的地址。
//为什么最后的输出语句,输出是3?
#include <stdio.h> int main(int argc, char *argv[]) { int b = 3; int *result = &b; long int t = (long int)result; printf("addr_b = %p\n", &b); printf("result = %p\n", result); printf("t = 0x%lx\n", t); printf("*t = %d", ((int *)t)[0]); return 0; }