标签:style color io ar sp c amp line r
ginobili@VM_44_28_sles10sp1:~/code> cat test3.cpp
#include <stdio.h>
int main()
{
char a[5] = {0};
char *pa = a;
printf("a = %p, pa = %p, &a=%p, &pa=%p\n", a, pa, &a, &pa);
return 0;
}
ginobili@VM_44_28_sles10sp1:~/code> g++ test3.cpp
ginobili@VM_44_28_sles10sp1:~/code> ./a.out
a = 0xbfc1e73f, pa = 0xbfc1e73f, &a=0xbfc1e73f, &pa=0xbfc1e738
原因是为什么呢?
标签:style color io ar sp c amp line r
原文地址:http://www.cnblogs.com/Torstan/p/3993816.html