单项选择题

有下列程序: #include <stdio.h> main() {int a[]={1,2,3,4},y,*p=&a[3]; --p; y=*p; printf("y=%d\n",y); } 程序的运行结果是( )。

A.y=0
B.y=1
C.y=2
D.y=3
<上一题 目录 下一题>
热门 试题

单项选择题
下列不构成无限循环的语句或语句组是( )。
A.n=0; do {++n;} while (n<=0);
B.n=0; while (1) {n++;}
C.n=10; While (; {n--;}
D.for(n=0, i=1; ;i++)n+=i
单项选择题
有下列程序: #inelude <stdio.h> main() { int x=8; for(;x>0;x--) { if(x%3) {printf( %d, ,x--);continue;} printf( %d, ,--x); } } 程序的运行结果是( )。
A.7,4,2
B.8,7,5,2
C.9,7,6,4
D.8,5,4,2
相关试题
  • 有下列程序: #include <stdio.h> ...
  • 有下列程序: #include <stdio.h> m...
  • 有下列程序: #include <stdio.h> ...
  • 有下列程序: #include <stdio.h> v...
  • 有下列程序: #include <stdio.h> m...