单项选择题

有以下程序:
#include<stdio.h>
main()
int a[]=2,3,5,4,i;
for(i=0;i<4;i++)
switch(i%2)
case0:switch(a[i]%2)
case0:a[i]++;break;
case1:a[i]--;
break;
case1:a[i]=0;

for(i=0;i<4;i++)printf("%d",a[i]);printf("\n");

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

A.3344
B.2050
C.3040
D.0304
<上一题 目录 下一题>
热门 试题

问答题
有以下程序: #include<stdio.h> #include<string.h> struct A int a;char b[10];double c;; Struct A f(struct A t): main() struct A a=1001, ZhangDa ,1098.0; a=f(a);printf( %d,%s,%6.1f n ,a.a,a.b,a.c); struct A f(struct A t) t.a=1002;strcpy(t.b, ChangRong );t.c=1202.0;return t; 程序运行后的输出结果是( )。
单项选择题
有以下程序: #include<stdio.h> int f(int n): main() int a=3,s; s=f(a);s=s+f(a);printf( %d n ,s); mt f(int n) static int a=1; n+=a++; return n; 程序运行后的输出结果是( )。
A.7
B.8
C.9
D.10
相关试题
  • 有以下程序: #include<stdio.h> mai...
  • 若有语句“doube x=17;int y;”,当...
  • 有以下程序: #include<stdio.h> fun...
  • 有以下程序: #include<stdio.h> typ...
  • 以下程序运行后的输出结果是______。...