单项选择题
有以下程序:
#include<stdio.h>
main()
int x=1,y=0,a=0,b=0;
switch(x)
case 1:
switch(y)
case 0:a++;break;
case 1:b++;break;
case 2:a++;b++;break;
case 3:a++;b++;
printf("a=%d,b=%d\n",a,b);
程序的运行结果是______。
A.a=1,b=0
B.a=2,b=2
C.a=1,b=1
D.a=2,b=1
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: struct STU char name[10];int num;float TotalScore;; void f(struct STU *p) struct STU s[2]= SunDan ,20044,550, Penghua ,20045,537,*q=s; ++p; ++q; *p=*q; main() struct STU s[3]= YangSan ,20041,703, LiSiGuo ,20042,580; f(s); printf( %s%d% 3.Of n ,s[1].name,s[1].num,s[1].TotalScore); 程序运行后的输出结果是______。
A.SunDan 20044 550
B.Penghua 20045 537
C.LiSiGuo 20042 580
D.SunDan 20041 703
点击查看答案&解析
单项选择题
以下结构体类型说明和变量定义中正确的是______。
A.typedef struct
int n;char c;);
REC t1,t2;
B.struct REC;
int n;char c;)REC;
REC t1,t2;
C.typedef struct REC;
int n;char c;REC;
D.struct
int n=0;char c='A';t1,t2;
REC t1,t2;
点击查看答案&解析
相关试题
有以下程序: # define f(x) (x*x...
有以下程序: main() int k=5; wh...
有以下程序: void f(int*q) int i...
有以下程序: main() int e[]=2,...
有以下程序: #include<stdio.h> mai...