int a[10] = {0,2,4,6,8}; int *px = a; y=*px++; 则y=

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 04:25:32
int a[10] = {0,2,4,6,8}; int *px = a; y=*px++; 则y=
xP]KP+>HtAh*j͏Jk*eH⼨gs/:?}^\Щ7;g ZφCAPxHJ#de ϢdZ8YpAWD2P={XD@sE.G1wXf{i&S760ݒ^,i^7j r7 _h~@L?Cg !|AH&5wqXȾι,m9}\@ť

int a[10] = {0,2,4,6,8}; int *px = a; y=*px++; 则y=
int a[10] = {0,2,4,6,8}; int *px = a; y=*px++; 则y=

int a[10] = {0,2,4,6,8}; int *px = a; y=*px++; 则y=
y=0;
其实y前面应该加上int,你可能忘了声明了.你可以用dev c++或者visual studio编译运行一下,结果是0.因为px指针指向的是a数组的第一个元素0,*运算级别比++高,所以y被赋值为0.