#include <stdio.h> main( ) { int a[ ]={1, 2, 3, 4, 5, 6}; int x, y, *p; p = &a[0]; x = *(p+2);

#include <stdio.h>
main( )
{ int a[ ]={1, 2, 3, 4, 5, 6};
int x, y, *p;
p = &a[0];
x = *(p+2);
y = *(p+4);
printf(“*p=%d, x=%d, y=%d\n”, *p, x, y);
}
运行结果为:

*p=1,x=3,y=5——这是无错的输出,代码有错会过不了编译。
温馨提示:内容为网友见解,仅供参考
第1个回答  2015-12-03
*p=1,x=3,y=5本回答被提问者采纳
相似回答