计算机二级C语言程序设计
VIP题库
有以下程序int f1(int x,int y){return x>y?x:y;} int f2(int x,int y){return x>y?y:x;} main(){ int a=4,b=3,c=5,d=2,e,f,g;e=f2(f1(a,b),f1(c,d));f=f1(f2(a,b),f2(c,d));g=a+b+c+d-e-f;printf("%d,%d,%d\n",e,f,g);}程序运行后的输出结果是______。
设有以下程序段int y;y=rand()% 30+1;则变量y的取值范围是______。
若有以下程序 #include void f(int x) { if (x >= 10) { printf("%d-", x%10); f(x/10); } else printf("%d", x); } main() { int z = 123456; f(z); }则程序的输出结果是______。
若有以下程序 #include void sp(int *a) { int b=2; *a = *a * 2; printf("%d,", *a); a=&b; *a = *a * 2; printf("%d,", *a); } main() { int k=3; sp(&k); printf("%d\n", k); }则程序的输出结果是______。
以下函数值的类型是______。fun(float x){ float y;y=3*x-4;return y;}
以下关于C语言函数参数传递方式的叙述正确的是______。
有如下程序#include int sum(int a, int b){return a + b - 2;}main(){int i;for (i=0; i
以下选项中函数形参不是指针的是______。
若有以下程序 #include char f(char x) { return x*x+''a''; } main() { char a, b=0; for ( a=0; a
有以下程序#include int f(int s,int t){ if (s < t) s=t;return s;}main(){ int i=3, j=5, *p=&i, *q=&j, r;r = f(*p,*q);printf("%d,%d,%d,%d,%d\n", i, j, *p, *q, r);}程序运行后的输出结果是______。
«
1
2
...
76
77
78
79
80
81
82
...
149
150
»