单项选择题
有以下程序:
#include <stdio.h>
main()
int c=0,k;
for(k=1;k<3;k++)
switch (k)
default: c+=k
case 2:c++;break;
case 4:c+=2;break;
printf("%d\n",c);
程序运行后输出的结果是( )。
A.3
B.5
C.7
D.9
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
若有定义语句:int m[]=5,4,3,2,1,i=4;,则下面对m数组元素的引用中错误的是( )。
A.m[--i]
B.m[2*2]
C.m[m[0]]
D.m[m[i]]
点击查看答案
单项选择题
下面程序的输出结果是( )。 #include <stdio.h> #include <string> void main() char s1[50]= some string* ,s2[]= test ; printf( %s n , strcat(s1,s2));
A.some string*
B.test
C.some stritest
D.some string *test
点击查看答案
相关试题
有以下程序: main() int a[]=1,...
设有定义: struct complex int real,...
有以下程序,其中函数f的功能是将多个字符...
有以下程序: #include <stdio.h> m...
有以下程序: #include <stdio.h> m...