选择题 若已有声明“double a[2][3]={1,2,3,4,5,6);”,则下列表达式中不能正确引用a[1][1]值的是______。
选择题 有以下程序:
#include<stdio.h>
int fun(int *x)
{ int f;
f=*x+*(x+1);
return f;
}
main()
{ int a[6]=(1,3,5,4,2,6),b[6],i=0,k=0;
do{ b[k]=fun(a+i);
k++;
i+=2;
} while(i<5);
for(i=0; i<k;i++)
printf('%d,',b[i]);
}
程序运行后的输出结果是______。
选择题 若要求从键盘读入含有空格字符的字符串,应使用函数______
选择题 以下程序的输出结果是______。
int x=1;
fun(int p)
{ int x=4;
x+=p++;
printf('%d',x);
}
main()
{ int a=3;
fun(a) ; x+=a++;
printf('%d\n',x);
}
选择题 以下不构成无限循环的语句或语句组是______。
选择题 将E-R图转换为关系模式时,实体和联系都可以表示为______。
选择题 有以下程序:
#include <stdio.h>
main()
{ char c;
for(;(c=getchar())!='#1;)
{ if(c>='a'c<='z') c=c-'a'+'A';
putchar(++c);
}
}
执行时输入:aBcDefG##<回车>,则输出结果是
选择题 为了降低算法的空间复杂度,要求算法尽量采用原地工作(in place)。所谓原地工作是指______。
选择题 如下程序的输出结果是______。
#include<stdio.h>
main()
{char ch[2][5]={'1234','5678'},*p[2];
int i,j,s=0;
for(i=0;i<2;i++)
p[i]=ch[i];
for(i=0;i<2;i++)
for(j=0;p[i][j]>'\0';j+=2)
{s=p[i][j]-'0';
printf('%d',s);}
}
选择题 以下表达式的值与x无关、其值恒为真的是______。
选择题 有如下程序:
#include<stdio.h>
#include<string.h>
main()
{
char *str='0\n0123\4':
printf('%d',strlen(str));
}
程序运行后的输出结果是______。
选择题 下面结构体的定义语句中,错误的是______。
选择题 层次型、网状型和关系型数据库划分原则是______。
选择题 下列二维数组初始化语句中,不正确的是______。
选择题 公司中有不同部门,而每个员工分属不同的部门,则实体部门与实体员工间的联系是______。
选择题 若有以下程序
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef struet stu{
char *name, gender;
int score;
} STU;
void f(char *p)
{
p=(char *)malloc(10);
strcpy(p, 'Qian');
}
main()
{
STU a={NULL, 'm', 290}, b;
a.name=(char *)malloc(10);
strcpy(a.name, 'Zhao');
b=a;
f(b.name);
b.gender='f'; b.score=350;
printf('%s, %c, %d,', a.name, a.gender, a.score);
printf('%s, %c, %d\n', b.name, b.gender, b.score);
}
则程序的输出结果是______。
选择题 若fp是指向某文件的指针,且已读到文件的末尾,则表达式feof(fp)的返回值是______。
选择题 若有以下定义,则对a数组元素地址的正确引用是______。
int a[5],*p=a;
选择题 以下叙述中正确的是______。
选择题 有以下程序:
# include <stdio.h>
main()
{ int x=1,y=0;
if(!x)y++;
else if(x==0)
if(x)y+=2;
else y+=3;
printf('%d\n',y);
}
程序运行后的输出结果是______。