单项选择题

下列程序的输出结果是( )。
#include<stdio.h>
main()
int a=0,i;
for(i一1;i<5;i++)
switch(i)
case 0:
case 3:a+=1;
case 1:
case 2:a+=2;
default:a+=3;


printf("%d",i);
)

A.19
B.1
C.6
D.8
<上一题 目录 下一题>
热门 试题

单项选择题
有以下说明和定义语句 struct student int age;char num[8]; struct student stu[3]=20, 200401 ,21, 200402 ,19, 200403 ; struct student *p=stu;; 以下选项中引用结构体变量成员的表达式错误的是
A) (p++)->num
B) p->num
C) (*p).num
D) stu[3].age
单项选择题
以下程序的输出结是_______。 #include <stdio.h> main() int a=200; #define a 100 printf( %d ,a); #undefa printf(%d ,a);
A) 200 100
B) 100 100
C) 100 200
D) 200 200
相关试题
  • 对下述程序的判断中,正确的是 void main...
  • 运行以下程序后,如果从键盘上输入65 1...
  • 若已定义的函数有返回值,则以下关于该函数...
  • 以下关于C语言的叙述中正确的是( )。
  • 设有结构体类型定义: struct try int ...