选择题 有以下程序:
#include<stdio.h>
main()
{ int a=7;
while(a--);
printf('%d\n', a);
}
程序运行后的输出结果是______。
选择题 以下选项中,合法的一组C语言数值常量是______。
选择题 阅读以下程序:
#include <stdio.h>
main()
{ int x;
scanf('% d', x);
if(x--<5)printf('% d', x);
else printf('% d', x++);
}
程序运行后,如果从键盘输入5,则输出结果是______。
选择题 以下选项中能表示合法常量的是______。
选择题 以下程序拟实现计算sum=1+1/2+1/3+…+1/50。
#include<stdio.h>
main()
{ int i;double sum;
sum=1.0;
i=1;
do
{ i++;sum+=1/i;}
while(i<50);
printf('sum=%lf\n',sum);
}
程序运行后,不能得到正确结果,出现问题的语句是______。
选择题 能从任意一个结点开始,没有重复地扫描到所有结点的数据结构是______。
选择题 以下程序的输出结果是______。
main()
{char st[20]='hello\0\t\\\';
printf('%d%d\n', strlen(st), sizeof(st));
}
选择题 若有以下程序
#include<stdio.h>
main()
{ char c1,c2;
c1='C'+'8;-'3'; c2='9'-'0';
printf('%c %d\n',c1,c2);
}
则程序的输出结果是______。
选择题 有以下程序:
#include <stdio.h>
main()
{ char*mm[4]={'abcd','1234','mnop','5678'};
char** pm=mm;
int i;
for(i=0; i<4; i++) printf('%s',pm[i]+i);
printf('\n');
}
程序的运行结果是______。
选择题 以下关于fclose(fp)函数的叙述正确的是______。
选择题 下列选项中,不属于模块间耦合的是______。
选择题 有下列程序:
#include<stdio.h>
#include<string.h>
typedef struct stu{
char name[9];
char gender;
int score;
}STU;
void f(STU *a)
{STU c={'Sun','f,,90},*d=c;
a=d;
strcpy(a->name,c.name);
a->gender=c.gender;
a->score=c.score:
printf('%s,%c,%d,',a->name,a->gender,a->score);
}
main()
{STU a={'Zhao','m',85};
f(a);
printf('%s,%c,%d',a.name,a.gender,a.score);
}
程序执行后的输出结果是______。
选择题 以下叙述中正确的是______。
选择题 中学教师和授课班级之间的联系是______。
选择题 设有条件表达式:(EXP)?i++;j-,则以下表达式中(EXP)完全等价的是______。
选择题 有以下程序:
#include <stdio.h>
#include <string.h>
typedef struct stu {
char name[10];
char gender;
int score;
} STU;
void f(STU *c)
{ strcpy(c->name,'Qian');
c->gende r= 'f';
e->score = 350;
}
main( )
{ STU a = {'Zhao', 'm', 290}, b;
b = a;
f(b);
printf('%s,%c,%d,', a.name, a.gender, a.score);
printf('%s,%c,%d\n', b.name, b.gender, b.score);
}
程序运行后的输出结果是______。
选择题 字符数组a和b中分别存储了字符串,判断字符串a和b相等,应当使用的是______。
选择题 语句“pfintf('a\bhow\'are\'y\\\bou\n');”的输出结果是______。
选择题 有以下程序
#include<stdio.h>
main()
{ char c[2][5]={'6938','8254'), *p[2];
int i,j,s=0;
for(i=0; i<2;i++) p[i]=c[i];
for(i=0; i<2; i++)
for(j=0; p[i][j]>0 ; j+=2) s=10*s+p[i][j]-'0';
printf('%d\n',s);
}
程序运行后的输出结果是______。
选择题 有以下程序
#include<stdio.h>
void fun(int a,int b)
{ int t;
t=a;a=b;b=t;
}
main()
{ int c[10]={1,2,3,4,5,6,7,8,9,0},i;
for(i=0;i<10;i+=2)fun(c[i],c[i+1]);
for(i=0;i<10;i++)printf('%d,',cf[i]);
printf('\n');
}
程序的运行结果是______。
