单项选择题
定义结构体数组:
struct stu
int num;
char name[20];
x[5];1,"L1",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) 1I2A3H4I
C) 1A2N3A4U
D) 2H3A4H5I
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下定义和语句 struct workers int nnm;charname[20];charc; struct int day;int month;int year;s; ; struct workers w,*pw; pw=&w; 能给w中year成员赋1980的语句是
A) *pw.year=1980;
B) w.year=1980;
C) pw->year=1980;
D) w.s.year=1980;
点击查看答案&解析
单项选择题
有以下程序: int a=4; int f(int n) int t=0;static int a=5; if(n%2) int a=6;t+=a++; elseint a;7;t+=a++; return t+a++; main() int s=a,i=0; for(;i<2;i++)s+=f(i); printf( %d n ,s); 程序运行后的输出结果是______。
A) 24
B) 28
C) 32
D) 36
点击查看答案&解析
相关试题
以下叙述中正确的是______。