指针测试代码:
#include <string.h> #include <stdio.h> int main(int argc, char **argv) { char *a,*b,*c; a=argv[0]; b=&a[strlen(a)]; c=b+2; printf("***aaaaaa=%s*** ",a); printf("***cccccc=%s*** ",c); } /* [root@rac1 Main]# ./a.out 123 456 789 ***aaaaaa=./a.out*** ***cccccc=23*** */