[讨论]玩转指针
#include<stdio.h>
char g[]="asdfsdfsdf";
void f(char g1[])
{ printf("g1的地址是:%#x\n",&g1);
printf("*g1是:%#x\n",&*g1);
printf("g1[0]是:%#x\n",&(g1[0]));
printf("++g1是:%#x\n",++g1);
}
int main()
{ char *p=g;
printf("p的地址是:%#x\n",&p);
printf("*p的地址是:%#x\n",&*p);
printf("g的地址是:%#x\n",&g);
printf("g[0]的地址是:%#x\n",&(g[0]));
f(g);return 0;
}
谁能用TC,GCC,VC分别编译下,并把结果发上来
[此贴子已经被作者于2006-8-15 17:16:01编辑过]