#include
#include
#include
#include
void main()
{
char *name[] = {"Follow me","BASIC","Great Wall","FORTRAN","Computer design"};
char **p;
p = name;
for(int i = 0;i < 5;i++,*p++)
{
printf("%d\n",*p);
printf("%s\n",*p);
}
system("pause");
}
输出结果:
第一个是输出指针地址的值。第二个是对指针以字符串方式输出。
主要是printf做了处理