选择题 有如下定义:
stmct st
{ int a;float b;} x[10];
FILE *fp;
若文件已正确打开,且数组x的10个元素均已赋值,以下将数组元素写到文件中的语句错误的是______。
选择题 有以下程序:
# include <stdio.h>
# include <string.h>
main()
{ printf{'%d\n', strlen('%d\n' ,strlen('ATS\ n012\|'));}
程序运行后的输出结果是______。
选择题 有以下程序
#include<stdio.h>
main()
{ int a=3;
do
{ printf('%d,',a-=2); }
while(!(--a));
printf('\n');
}
程序运行后的输出结果是______。
选择题 线性表L=(a1,a2,a3,…ai,…an),下列说法正确的是
选择题 某二叉树的中序序列为BDCA,后序序列为DCBA,则前序序列为______。
选择题 关于程序中的注释,以下叙述正确的是______。
选择题 以下结构体类型说明和变量定义中正确的是______。
选择题 以下叙述中正确的是______。
选择题 一间宿舍可住多名学生,则实体宿舍和学生之间的联系是______。
选择题 有以下程序
#include<stdio.h>
main()
{
int s[12]={1,2,3,4,4,3,2,1,1,1,2,3},c[5]={0},i;
for(i=0;i<12;i++)
c[s[i]]++;
for(i=1;i<5;i++)
printf('%d',c[i]);
printf('\n');
}
程序的运行结果是______。
选择题 C语言规定,在一个C程序中,main()函数的位置______。
选择题 有以下程序
# include<stdio.h>
# include<string.h>
main()
{ char a[10]='abcd';
printf('%d,%d\n',strlen(a),sizeof(a));
}
程序运行后的输出结果是______。
选择题 有下列程序:
#include<stdio.h>
main()
{ int a=6, b=7, m=1;
switch(a%2)
{ case 0: m++; break;
case 1: m++;
switch(b%2)
{default: m++;
case 0: m++; break;
}
}
printf('%d\n', m);
}
程序的运行结果是______。
选择题 有以下程序:
#include <stdio.h>
main( )
{
char name[10] = {'S','T','R'};
name[2] ='#'; name[6] = 0;
printf('%s\n', name);
}
程序运行后的输出结果是______。
选择题 下列关于数据库设计的叙述中,正确的是______。
选择题 有如下程序:
#include <stdio.h>
main()
{
char* p1=0;
int* p2=0;
double* p3=0;
printf('%d,%d,%d\n',sizeof(p1),sizeof(p2),sizeof(p3));
}
程序运行后的输出结果是______。
选择题 有如下程序:
#include <stdio.h>
void get_put()
{
char ch;
ch = getchar();
if (ch != '\n') get_put();
putchar(ch);
}
main( )
{
get_put();
}
程序运行时,输入ABCD<回车>,则输出结果是______。
选择题 在长度为n的有序线性表中进行二分法查找,最坏情况下需要比较的次数是______。
选择题 函数调用strcat(strcpy(str1, str2), str3)的功能是______。
选择题 设变量均已正确定义,若要通过
scanf('%d%c%d%c',a1,c1,a2,c2);
语句为变量a1和a2分别赋数值10和20,为变量c1和c2赋字符X和Y。以下所示的输入形式中正确的是(注:代表空格字符)______。
