标签:style blog http io color os sp for on
原文:7.2数组和指针
#include<stdio.h> int main(void) { long multiple[]={15L, 25L, 35L, 45L}; long *p=multiple; //把p设置为multiple的地址,为什么不是multiple的值 for(int i=0;i<sizeof(multiple)/sizeof(multiple[0]);++i) printf("address p+%d(&multiple[%d]):%llu *(p+%d) value:%d\n",i,i,(unsigned long long)(p+i),i,*(p+i)); printf("\n type long occupies: %d butes\n",(int)sizeof(long)); return 0; }
标签:style blog http io color os sp for on
原文地址:http://www.cnblogs.com/lonelyxmas/p/4156779.html