单项选择题
有以下程序:
#include<stdio.h>
main()
{int a[]={2, 4, 6, 8}, *p=a, i;
for(i=0; i<4; i++)a[i]=*p++;
printf("%d\n", a[2]);
}
程序的输出结果是______。
A.6
B.8
C.4
D.2
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
定义结构体数组:struct stu{ int num;char name[20];}X[5]={1, LI , 2, ZHAO , 3, WANG , 4, ZHANG , 5, LIU }; for(i=1; i<5; i++)printf( %d%c , x[i].num, x[i].name[2]); 以上程序段的输出结果为______。
A.2A3N4A5U
B.112A3H4I
C.1A2N3A4U
D.2H3A4H5I
点击查看答案&解析
单项选择题
若有以下程序段:int a=0, b=0, c=0; c=(a-=a-5), (a=b, b+3); printf( %d, %d, %d n , a,b, c); 执行后的输出结果是______。
A.3,0,-10
B.0,0,5
C.-10,3,-10
D.3,0,3
点击查看答案&解析
相关试题
函数ftell(fp)的作用是______。
下面程序的功能是输出以下形式的金字塔图案...
有以下程序片段:y=-1; if(x!=0)...
有以下程序:main(){ int x=0, y...
有以下程序:main(){ int x=102,...