笔果题库
高级语言程序设计
历年真题
搜题找答案,就上笔果题库
从键盘输入10个整数,由大到小排序后输出。
搜题找答案,就上笔果题库
求a、b和c的最大值并输出。 #include int f(int x, ______) /*第一空*/ {return(______?y: x);} /*第二空*/ void main() { int a=3, b=4, c=5, d; ______=f(f(a,b), f(a,c)); /*第三空*/ printf("%dn", d); }
搜题找答案,就上笔果题库
计算并输出结果。 #include void main() { float sum; float fun(int); ______=fun(10); /*第一空*/ printf("sum=%.4f\n",sum); } float fun(______n) /*第二空*/ { int f=1,I; float m=0; for(i=1; i { m+=1.0/i*f; ______=-f; /*第三空*/ } return m; }
搜题找答案,就上笔果题库
将一维数组逆序存放后输出。例如int a[3]={1,2,3},逆序存放后int a[3]={3,2,1}。 include void move(int*p,int n); void main() { int i,n=6, a[6]={1,2,3,4,5,6}; move(a, 5); for(i=0; i } void move(int*p,int n) { ______; /*第二空*/ for(k=0;k {c=p[k]; p[k]=p[n-k]; ______;} /*第三空*/ }
搜题找答案,就上笔果题库
1.正确的用户自定义标识符是
搜题找答案,就上笔果题库
2.设int a=5, b = 6 ;,正确的赋值语句是
搜题找答案,就上笔果题库
设int a=3,b=4,c;,执行语句c=(a >b)?—a:b++;后,c的值是
搜题找答案,就上笔果题库
4.表达式4.8-1/2+5%3的值是
搜题找答案,就上笔果题库
5.设int a=1,b=6;,执行表达式-a||(b=8)后,a和b的值分别是
搜题找答案,就上笔果题库
6.正确的整型常数是