不管什么类型的指针变量,在32位的操作系统内,都是占4个字节
#include <stdio.h>
int main(int argc, char *argv[])
{
// 大多数情况下,指针数组都用来保存多个字符串
char * name[5] = {"Follw me", "BASIC", "Greatwall", "FORTRAN", "AA"};
int i;
for(i=0;i<5;i++)
{
printf("%s\n", name[i]);
printf("%p\n", & name[i]);
}
return 0;
}
结果:
Follw me
0060FE88
BASIC
0060FE8C
Greatwall
0060FE90
FORTRAN
0060FE94
AA
0060FE98