选择题 若有以下程序段
double x=5.16894;
printf('%f\n',(int)(x*1000+0.5)/(double)1000);
则程序段的输出结果是______。
选择题 有以下程序
#include<stdio.h>
void fun (char *c)
{ while(*c)
{ if(*c>='a'*c<='z')
*c=*c-('a'-'A');
c++;
}
}
main()
{ char s[81];
gets(s);
fun(s);
puts(s);
}
当执行程序时,从键盘上输入Hello Beijing<回车>,则程序的输出结果是______。
选择题 以下叙述中,正确的是______。
选择题 有以下程序:
#include <stdio.h>
main()
{ int a,b;
for(am0;a<3;a++)
{ scanf('%d',b);
switch(b)
{case 1:printf('%d,',b++);
case 2:printf('%d,',b++);
default:printf('%d,',b++);
}
}
printf('\n');
}
执行时输入:1 2 3<回车>,则输出结果是______。
选择题 某个工厂有若干个仓库,每个仓库存放有不同的零件,相同零件可能放在不同的仓库中。则实体仓库和零件间的联系是______。
选择题 有表示公司和职员及工作的三张表,职员可在多家公司兼职。其中公司C(公司号,公司名,地址,注册资本,法人代表,员工数),职员S(职员号,姓名,性别,年龄,学历),工作W(公司号,职员号,工资),则表W的键(码)为______。
选择题 对于if(表达式)语句,以下叙述正确的是______。
选择题 已知有结构类型定义:
typedef struct ex{long int hum; char sex; struct ex *next; )student;
下列叙述错误的是______。
选择题 若有以下程序:
#include<stdio.h>
void prtv(int*x)
{printf('%d\n', ++*x); }
main()
{ int a=25;
prtv(a);
}
程序的输出结果是
选择题 有以下程序:
#include<stdio.h>
void fun(char*t, char*s)
{ while(*t!=0)t++;
while((*t++=*s++)!=0);
}
main()
{char ss[10]='acc', aa[10]='bbxxyy';
fun(ss, aa); printf('%s, %s', ss, aa);
}
程序运行结果是______。
选择题 有以下程序:
#include <stdio.h>
#include <stdlib.h>
int fun(int n)
{ int * p;
p=(int *)malloc(sizeof(int));
*p=n;
return * p;
}
main()
{ int a;
a=fun(10);
printf('% d\n', a+fun(a));
}
程序的运行结果是______。
选择题 在数据库技术中,为提高数据库的逻辑独立性和物理独立性,数据库的结构被划分成用户级、存储级和______
选择题 有以下程序:
#include<stdio.h>
#define N 4
int fun(int a[][N])
{ int i,j,x=0;
for(i=0;i<N;i++)
for(j=0;j<N;j++)
if(i==j)
x+=a[N-1-j][i];
return x;
}
main()
{ int x[N][N]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,17}},y;
y=fun(x);
printf('%d\n',y);
}
程序运行后的输出结果是______
选择题 有C语言表达式:2*3+4+15%3,关于其执行顺序,以下叙述中正确的是
选择题 函数ftell(fp)的作用是______。
选择题 有以下程序:
#include<stdio.h>
main()
{FILE *fp; int i, a[6]={1, 2, 3, 4, 5, 6};
fp=fopen('d2.dat', 'w+');
for=(i=0; i<6; i++) fpintf(fp, '%d\n', a[i]);
rewind(fp);
for(i=0; i<6; i++) fscanf(fp, '%d', a[5-i]);
fclose(fp);
for(i=0; i<6; i++) printf('%d, ', a[i]);
}
程序运行后的输出结果是______。
选择题 有以下程序
#include<stdio.h>
main()
{ int n=2, k=0;
while(k++n++>2);
printf('%d%d\n', k, n);
}
程序运行后的输出结果是______。
选择题 有以下程序:
#include<stdio.h>
int sum(int*array,int len)
{
if(len==1)
return array[1];
else
return array[1]+sum(array+1,len-1);
}
main()
{
int array[5]={0,9,1,2},res;
res=sum(array,3);
printf('%d\n',res);
}
程序运行后的输出结果是______。
选择题 下面不属于对象主要特征的是______。
选择题 C语言可执行程序的开始执行点是______。