单项选择题

有以下程序
#include<stdio.h>
struct S
int a,b;data[2]=10,100,20,200;
main()
struct S p=data[1];
printf("%d\n",++(p.a));

程序运行后的输出结果是______。

A.21
B.11
C.20
D.10
<上一题 目录 下一题>
热门 试题

单项选择题
有以下定义和语句 struct workers int num;char name[20];char c; struct int day;int month;int year;s; ; struct workers w,*pw; pw=&w; 能给w中year成员赋1980的语句是______。
A.w.s.year=1980;
B.w.year=1980;
C.pw->year=-1980;
D.*pw.year=1980;
单项选择题
有以下程序 #include<stdio.h> main() struct STUchar name[9];char sex;double score[2];; struct STU a= Zhao ,’m’,85.0,90.0,b= Qian ,’f’,95.0,92.0; b=a; printf( %s,%c,%2.0f,%2.0f n ,b.name,b.sex,b.score[0],b.score[1]); 程序的运行结果是______。
A.Zhao,m,85,90
B.Qian,m,85,90
C.Zhao,f,95,92
D.Qian,f,95,92
相关试题
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 以下程序依次把从终端输入的字符存放到f文...