摘要:
下面代码在i386系列PC中输出是什么: 1 typedef struct st{ 2 int xxx; 3 short* yyy; 4 char ccc[32]; 5 }pst; 6 7 int main(void){ 8 pst ppp[16]; 9 char* p = (char*)(ppp[2].ccc+32);10 printf("%d\n",(p-(char*)(ppp)));11 }分析:求的是什么? p是一个地址,ppp也是一个地址,两者相减,明显求的是偏移量。 现在先来看看sizeof(pst)的值,在i386系列PC下,i... 阅读全文
posted @ 2013-04-26 09:39
gjhqq
阅读(146)
评论(0)
推荐(0)
浙公网安备 33010602011771号