随机组卷按大纲配比:判断 8 · 单选 20 · 填空 10 · 综合 2(共 40 题 · 80 分)
- 填空函数 fMinNum 的形参 a 所指数组中只存放正整数,函数的功能是查找数组中最小值,并作为函数值返回。请补全代码。 c int fMinNum (int a[],int n){ int i, min; min=a[0]; for(i=n-1; i>0;i--) if(________>a[i]) min=________; return min; }做这题 →
- 填空当执行下面的程序时, 如果输入 ABC, 则输出结果是 ____。 c #include "stdio.h" #include "string.h" main() { char str[20]="0123456"; scanf("%s", str);strcat(str,"789"); puts(str); }做这题 →
- 单选若有以下说明: int a[12]={1,2,3, 4,5,6, 7,8,9, 10, 11, 12};char c='a',d, g;则数值为 4 的表达式是()做这题 →
- 填空有以下程序 c #include void fun(char *c,int d){ *c=*c+1;d=d+1; printf("%c,%c,",*c,d); } main(){ char b='a',a='A'; fun(&b,a); printf("%c,%c\n",b,a); }程序运行后的输出结果是 。 c做这题 →
- 填空有如下程序: long fib(int n){ if(n > 2) return (fib(n-1) + fib(n - 2)); else return(2); } main(){ printf("%d\n",fib(3)); }该程序的输出结果是____。 c做这题 →
- 填空有以下程序 #include int fun(int a, int b){ if(b==0) return a; else return(fun(--a,--b)); } main(){printf("%d\n",fun(4,2);} 程序的运行结果是____。做这题 →
- 填空以下程序的结果是____。 c int a,b; void fun() {a=100; b=200;} main() { int a=5,b=7; fun(); printf("%d%d\n",a,b); }做这题 →
- 填空设函数中有整型变量 n,为保证其在未赋初值情况下初值为 0,应选择的存储类别是做这题 →
- 单选以下选项中叙述错误的是()做这题 →
- 填空表达式 1! = 2 && 3! = 5 的值是_。做这题 →
- 填空已知 a = 12 则表达式 a + = a - = a = a 的结果是 ____。做这题 →
- 填空若已定义 int a, 则表达式 a = 10, a + 10, a++ 的值是 ____。做这题 →
- 单选在 C 语言中,引用数组元素时,其数组下标的数据类型允许是()。做这题 →
- 单选int x[2][3];,则以下关于二维数组 x 的叙述错误的是()。做这题 →
- 填空int x; while(1){scanf("%d", &x); if(x==-1) break;} 若用户输入 9 12 3 -1 5 -1(回车),则上述循环语句被执行的次数为 ____。做这题 →
- 填空以下程序运行时,输出到屏幕的结果是 ____。 #include <stdio.h> void f (int n){ int t; txt putchar (n%10+'0'); t=n/100; if(t!=0) f(t); } int m=654321; f(m); printf("\n"); } txt void main(){做这题 →
- 填空小写字母, 小写字母转换为对应大写字母的表达式是____。做这题 →
- 填空有如下程序: \begin{array}{l} \text {main () } { \ \text {int} y = 3, x = 3, z = 1; \ \end{array} txt printf ("%d,%d\n",(++x,y++),z+2); } 运行该程序的输出结果是____。做这题 →
- 填空在 C 语言中,表达式 !10 != 1 的值是 ____。做这题 →
- 填空写出下列程序的输出结果。 c #include main(){ int i=10; switch (i){ case 9: i+=1; case 10: i+=2; case 11: i+=3; default: i+=4; } printt("i=%d\n",i); }做这题 →
- 填空以下程序的输出结果是____。 txt main(){ int a=0; a+=(a=8); printf("%d\n",a); }做这题 →
- 填空有以下程序:main(){ int i=10,j=1; printf("%d,%d\n",i--,++j);}执行后输出结果是____。做这题 →
- 填空在 C 语言中, 运行下列程序后, 输出结果为 ____。 #inc lude<stdio.h> int main (void) int n=5; while(n>'){ n--; printf("%d", n); } return 0; }做这题 →
- 填空有以下程序:#include <stdio.h> void main() { int i.s=0; \text {for} (i = 1; i < 1 0; i + = 2) s + = i + 1; printf( "%d\n",s);} 程序执行后的输出结果是(40)30做这题 →
- 填空C语言中用_________语句把函数值返回调用丽数。做这题 →
- 填空C语言中“if...else...”语句属于高级语言中的____成分。做这题 →
- 填空在c语言中,有且仅有一个_________。做这题 →
- 填空若int x=3,则执行表达式x*=x+=x-1后x的值为________。做这题 →
- 填空若二维数组a有m 列,则在a[i][j]前面的元素个数为_________。做这题 →
- 填空在C语言中,主函数名是_____。做这题 →
- 填空若有定义语句:inta=5;,则表达式a++的值是_____。做这题 →
- 填空C语言的函数可分为主函数 main、标准库函数和_______。做这题 →
- 填空在 C 语言中,运行下列程序后,输出结果为 4321 txt #include int main ( void ) { int n =5; while ( n >1) txt { n--; printf ("% d ", n ): } return 0; }做这题 →
- 填空C 语言中使用中间变量交换 a,b 的值,c=a;,____;,____;。做这题 →
- 填空若有以下代码: \text {char} a [ 1 0 ] = " 1 2 3 5 6 7"; \text {char} b [ 1 0 ] = " a b c d e f g"; \underline{strcpy(a,b);} \text {printf} (" 0 % - 0 5 o", a [ b [ 4 ] - b [ b [ 5 ] - b [ 3 ] ]) - 3 2); 如有空格请使用小写字母 v 代表 请写出输出结果____。做这题 →
- 填空有以下程序: c #include awk int a =5; void fun(int b){ int a =10; a+=b; printf("%d",a); } main(){ int c=20; fun(c); a+=c; printf("%d\n",a); } 则程序运行后的输出结果是____。做这题 →
- 填空设 a, b, c 都是 int 类型变量,如果 a 的值为 1,b 的值为 2,则执行 “c=a++||b++;” 语句的,变量 b 的值是做这题 →
- 填空利用条件运算符将两条语句 “if(a>=b) m=a;”, “else m=b;” 转换成与其等价的一条语句是 ____。做这题 →
- 填空若有以下程序: nain(){ int x,y,z; $$ x = y = 1; $$ $$ z = x + +, y + +, + + y; $$ printf("%d,%d,%d\n",z,y,x); }做这题 →
- 单选下列程序的输出结果是()。 #include <stdio.h> main(){ int i, a =0, b=0; for(i=1, i<10;i++){ if(i%2==0){ a++; continue; } b++; } printf("a=%d,b=%d",a,b); }做这题 →
- 填空若有 x 是 int 型变量,则执行以下语句结果是() \text {for} (x = 1;; x + + ) { \text {if} (x % 2 = = 0) \text {if} (x % 3 = = 0) \text {if} (x % 5 = = 0) { printf(%d",x); \text {break;} }做这题 →
- 填空有以下函数: # \text {include} } # \text {define} S (x) (x) ^ {*} x ^ {*} 2 main() \text {int} k = 5, j = 2; \text {printf} (% 0 5 o, % - 5 d ^ {\prime \prime}, S (k + j), S (k - j)); }若有空格使用“X”代替。做这题 →
- 填空用语句计算 1 / 4 个球的体积 vol = 1 / 4 * 3.14 * r * r * r; 若变量 r 的值为 2, 则 vol 的值为 ____。做这题 →
- 填空有程序片段: txt int score; scanf("%d",&score); if(score >60)printf("passed."); if(score >80)printf("nice."); 程序运行时,若用户输入90,屏幕输出为____。做这题 →
- 填空芯用数组名作为函数调用的实参,传递给形参的是____。做这题 →
- 填空若 m 是一个三位数,则其个位数字的表达式为 ____。做这题 →
- 填空若有以下程序: int fun3(int x){ static int a =3; a+=x; return(a); } void main(){ int k=2,m=1,n; n = \text {fun3} (k); n = \text {fun3} (m); printf(%d\n",n); } 以上程序的运行结果是____。做这题 →
- 填空有语句:int sum,i;for(sum =0,i=0;i int fun(int a[],int num){ int r,k=0; do{ r=num %2; ________; k++; num = ________; }while(num!=0); return k; } int main(){ int n,a[10],k,i; scanf("%d",&n); k = _fun(a,n); for(i=_________;i>=0;i--) printf("%d",a[i]); system("pause"); return 0; 江苏省2023年普通高校“专转本”选拔考试 计算机专业大类专业综合操作技能 模拟试卷18做这题 →
- 填空假设 int x = 1, y = 2, z = 3; 则表达式 z += x > y ? ++x: +y 的值是 ____。做这题 →
- 填空有下列程序 c #include main(){ int a=1,b=1,c=1,d=1; if(--a||b--||--c && d--) printf("%d,%d,%d,%d\n",a,b,c,d); } 执行后的输出结果是() c做这题 →