单选题有以下程序
#include
main(){FILE*f;
f=fopen("filea.txt","w");
fprintf(f,"abc");
fclose(f);
}
若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为
单选题设有如下的说明和定义:
struct{
int a;
char *s;
}x, *p=
x.a=4;
x.s="hello";
则以下叙述中正确的是______。
单选题以下程序的输出结果是______。
#include<stdio.h>
main()
{ int a=5,b=4,c=6,d;
printf("%d/n",d=a>b?(a>c?a:c):(b));
}
单选题以下程序的输出结果是 #include<stdi0.h>
main() { int i=0,a=0;
while(i<20) { for(;;) {
if((i%10)==0)break; elsei--;
} i+=11;a+=i;
} printf(“%d/n”,A) ; }
A. 21
B. 32
C. 33
D. 11
单选题若变量都已正确说明,则以下程序段输出结果为______。
#include<stdio.h>
main()
{char a="a";
int b=2;
printf(a>b?"***a=%d":"###b=%d",a,b);
}
单选题某带链栈的初始状态为top=bottom=NULL,经过一系列正常的入栈与退栈操作后,top=bottom=20。该栈中的元素个数为______。
单选题以下程序的输出结果是( )。
#include main()
struct st {p=aa;
{int x;int*y;}*p; printf("%d\n",++(p->x));}
int dt[4]={1,2,3,4};
struct st aa[4]={2,&dt[0],3,&dt[0],4,
&dt[0],5,&dt[0],};
单选题有以下程序:
#include<stdio.h>
main()
{ int a=1,b=2;
for(;a<8;a++){b+=a;a+=2;}
printf("%d,%d/n",a,b);
程序运行后的输出结果是______。
单选题有以下程序
main()
{int a=1,b=3,C=5,*P;
int *pl=&a,,*p2=&b,*p3=&c;
*P=*pl*(*p2);
printf("%d\ n",*P);
}
执行后的输出结果是【 】。
单选题若a是noat型变量,b是unsigned型变量,以下输入语句中,合法的是______。
单选题设fp为指向某二进制文件的指针,且已读到此文件末尾,则函数feof(fp)的返回值为______。
单选题以下定义语句中正确的是______。
单选题在C语言中,char型数据在内存中的存储形式为______。
单选题下列叙述中错误的是{{U}} {{/U}}。
A. 在C语言中,函数中的自动变量可以赋初值,每调用一次赋一次初值
B. 在C语言中,在调用函数时,实参和对应形参在类型上只需赋值兼容
C. 在C语言中,外部变量的隐含类型是自动存储类别
D. 在C语言中,函数形参的存储类型是自动(auto)类型的变量
单选题若a为int类型,且其值为3,则执行完表达式a+=a-=a*a后,a的值是( )。
单选题有以下程序:
#include<stdio.h>
main()
{ int i;
for(i=1; i<=5; i++)
{if(i%2)printf("*");
else continue;
printf("#");
}
printf("$/n");
}
程序的输出结果是______。
单选题判断char型变量c是否为大写字母的最简单且正确的表达式是
A.'A'<=c<='Z'
B.(c>='A')‖(c<='Z')
C.('A'<=c)AND('Z'>=c)
D.(c>='A')&&(c<='Z')
单选题以下关于指针的说法错误的是______。
单选题设有以下说明语句: struct ex int x;float y;char z; example;则下面叙述中不正确的是( )。 A) struct是结构体类型的关键字 B) example是结构体类型名 C) x,y,z都是结构体成员名 D) struct ex是结构体类型名
单选题有以下程序:
#include
char f(char x)
{
return x*x%10+'0':
}
main()
{
char a;int b=0;
for(a=0;a<5;a+=1)
{
b=f(a);putchar(b);
}
}
则程序的输出结果是( )。