高级语言程序设计(一)2014年4月真题及答案,该试卷为高级语言程序设计(一)自考历年真题试卷,包含答案及详细解析。
从键盘输入10个整数,由大到小排序后输出。
将一维数组逆序存放后输出。例如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<=n/2; k++) { c=p[k]; p[k]=p[n-k]; _________;} /*第三空*/}
}
void move(int *p, int n)
_________; /*第二空*/
for(k=0; k<=n/2; k++)
{ c=p[k]; p[k]=p[n-k]; _________;} /*第三空*/
计算1到100的平方根,并将结果保存至二进制文件root.dat。
求a、b和c的最大值并输出。
#include
int f(int x, _________) /*第一空*/
{ return(_________?y:x); } /*第二空*/
int a=3, b=4, c=5, d;
_________=f(f(a,b), f(a,c)); /*第三空*/
printf("%d\n", d);
#define N 5
int k, s1=0, s2=0;
for(k=1; k switch(k%4) { case 1: case 2: s1+=1; break; case 3: case 0: s2+=1; break; } printf("s1=%d,s2=%dn", s1, s2);}
switch(k%4)
{ case 1:
case 2: s1+=1; break;
case 3:
case 0: s2+=1; break;
printf("s1=%d,s2=%dn", s1, s2);
int f(int n)
if(n=2) return 0;
else return(n+f(n-2));
int a=10;
printf("%d\n", f(a));
int f(int t)
int b;
static int c=3;
b=c+t;
c++;
return b;
int i, k;
for(i=1; i<3; i++)
{ k=f(i);
printf("%2d", k);
printf("\n");
int k, m;
for(m=3; m<12; m++)
{ for(k=2;k if(m%k==0) break; if(k==m) printf("%2d",m); }}
if(m%k==0) break;
if(k==m) printf("%2d",m);
表达式(int)(3.5+1/2)的值是_________。
相关试卷
管理信息系统2009年1月真题及答案
管理信息系统2009年10月真题及答
管理信息系统2010年1月真题及答案
管理信息系统2010年10月真题及答
管理信息系统2011年1月真题及答案
管理信息系统2011年10月真题及答
管理信息系统2012年4月真题及答案
管理信息系统2012年10月真题及答
管理信息系统2013年4月真题及答案
管理信息系统2013年10月真题及答