有下列程序: include<stdio.h> main() {char c; while((c=getchar())!=,)putcha
有下列程序: include<stdio.h> main() {char c; while((c=getchar())!=,)putchar(C) ; } 程序运行时,如果从键盘输入:A,B,<CR>,则输出结果为______。
有下列程序: include<stdio.h> main() {char c; while((c=getchar())!=,)putchar(C) ; } 程序运行时,如果从键盘输入:A,B,<CR>,则输出结果为______。
有以下程序 #include <stdio .h> main () { printf("%d\n", NULL); }
A.0
B.1
C.-1
D.NULL没定义,出错
有以下程序:#include <stdio, h>void sum(int a[ ] ){ a[0]=a[-1] +a[1];}main (){ int a[10] = {1,2,3,4,5,6,7,8,9,10}; sum(&a[2]); prinff("% d \n",a[2]); }程序运行后的输出结果是()。
A.6
B.7
C.5
D.8
有以下程序:#include <stdio, h>main(){ char a1 ='M',a2 ='m'; printf("%c\n",(a1,a2)); } 以下叙述中正确的是()。
A.程序输出大写字母M
B.程序输出小写字母m
C.格式说明符不足,编译出错
D.程序运行时产生出错信息
有以下程序: #include <stdio, h> main () { int a =666,b =888; printf("%'d \n", a,b); 程序运行后的输出结果是()。
A.错误信息,
B.666
C.888
D.666,888
有以下程序: #include <stdio, h> main() { int m =0256,n =256; printf("% o % o \n" ,m,n); 程序运行后的输出结果是() 。
A.0256 0400
B.0256 256
C.256 400
D.400 400
有以下程序:#include <stdio, h>#include <string, h>struet STU{ int nam; float TotalSeore;};void f(strnct STU p){ struct STU s[2] = { {20044,550} ,{20045,537} }; p.num = s [1]. num; p.TotalScore = s [1]. TotalScore;main(){ struct STU s[2] = {{20041,703} ,{20042,580}}; f(s[0] ); printf("%d %3.Of\n" ,s[0].num,s[0].TotalSeore); }程序运行后的输出结果是()。
A.20045 537
B.20044 550
C.20042 580
D.20041 703
有下面的程序: include <stdio, h> main () { enum team {my,your=4,his,her=his+10}; prinff(" % d %d %d %d \n" ,my,your,his,her); 此程序的输出结果是【 】。 A) 0 1 2 3 B) 0 4 0 1 0 C) 0 4 5 1 5 D) 1 4 5 1 5
有以下程序:#include <stdio, h>void fun(iht * a,int i,int j){ int t; if(i < j) { t=a[i];a[i] =a[j] ;a[j]=t; i++;j--; fun(a,i,j);main () int x[ ]: {2,6,1,8} ,i; fun(x,0,3); for(i=0;i <4;i ++ ) printf("%2d" ,x[i] ); printf(" \n");
A.1268
B.8621
C.8162
D.8612
有以下程序: #include <stdio, h>main () { int k=5,n =0; while (k>0) { switch (k) { default: break; case 1 : n+ =k; case 2 : case3 : n+ =k; } k--; printf("% d \n" ,n);}程序运行后的输出结果是()。
A.0
B.4
C.6
D.7
有以下程序: #include <stdio, h>void sort(int a[] ,int n){ int i,j,t; for(i=0;i<n;i ++ ) for(j =i+ 1;j<n;j ++ ) if(a[i]<a[j]){ t=a[1] ;a[i]=a[j] ;a[j] =t; }main(){ int aa[10] = {1,2,3,4,5,6,7,8,9,10} ,i; sort(aa +2, 5); for(i =0;i<10;i++) prinff("%d," ,aa[i]); prinff("\n");程序运行后的输出结果是()。
A.1,2,3,4,5,6,7,8,9,10,
B.1,2,7,6,3,4,5,8,9,10,
C.1,2,7,6,5,4,3,8,9,10,
D.1,2,9,8,7,6,5,4,3,10,
有以下程序: #include <stdio, h>int a =2;int f(int n){ static int a: 3; int t=0; if(n%2){ static int a=4;t+ =a++;} else { static int a=5;t+ :a++;} return t + a + +;main (){ int s=a,i; for(i=0;i<3;i++)s + =f(i); prinff("% d \n" ,s); }程序运行后的输出结果是()。
A.26
B.28
C.29
D.24
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!