选择题 有以下程序:
#include<stdio.h>
struct ball
{ char color[10];
int dim;};
main()
{ struct ball list[2]={{'white',2},{'yellow',3}};
printf('%s:%d\n',(list+1)->color,list->dim);
}
程序运行后的输出结果是
选择题 以下叙述正确的是 。
选择题 设有定义:
double a,b,c;
若要求通过输入分别给a、b、c输入1、2、3,输入形式如下(注:此处□代表一个空格)
□□1.0□□2.0□□3.0<回车>
则能进行正确输入的语句是______。
选择题 下列叙述中正确的是______。
选择题 以下叙述错误的是______。
选择题 有下列程序:
#include<stdio.h>
main()
{int a=-1,b=2;
for(;a++ b--;)
printf('%d,%d,',a,b);
printf('%d,%d',a,b);
}
程序执行后的输出结果是______。
选择题下面程序的运行结果是______。for(i=3;i<7;i++)printf((i%2)?('**%d\n'):('##%d\n'),i);A.B.C.D.
选择题 在满足实体完整性约束的条件下______。
选择题 以下叙述中正确的是______。
选择题若有以下程序段,w和k都是整型变量:w=k;LB:if(w==0)gotoLE;w--;printf('*')gotoLB;LE;则不能与上面程序段等价的循环语句是______。
选择题 以下不正确的定义语句是______。
选择题 有下列程序:
#include <stdio.h>
main()
{ int a=123456,b;
while(a)
{ b=a%10;
a/=10;
switch(b)
{ default:printf('%d',b++);
case 1:break;
case 2:printf('%d',b++);break;
case 3:printf('%d',b++);
case 4:printf('%d',b++);
case 5:printf('%d',b++);
}
}
}
程序运行后的输出结果是______。
选择题 有以下程序:
#include<stdio.h>
main()
{char ch[2][5]={'6937', '8254'}, *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'p[i][j]<='9'; j+=2) s=10*s+p[i][j]-'0';
printf('%d\n', s);
程序运行后的输出结果是
选择题 设有以下程序段:
float a[8]={1.0,2.0);
int b[1]={0};
char c[]={'A','B'};
char d=='1';
以下叙述中,正确的是______。
选择题 有以下程序
#include<stdio.h>
int fun(char p[][10])
{ int n=0,i;
for(i=0; i<7;i++)
if(p[i][0]=='T')n++;
return n;
}
main()
{ char str[][10]={'Mon','Tue','Wed','Thu','Fri','Sat','Sun'};
printf('%d\n',fun(str));
}
程序执行后的输出结果是______。
选择题 有如下程序:
#include <stdio.h>
main()
{
char ch='M';
while(ch !='K')
{
ch--;
putchar(ch);
}
printf('\n');
}
程序运行后的输出结果是______。
选择题 设有栈S和队列Q,初始状态均为空。首先依次将A,B,C,D,E,F入栈,然后从栈中退出三个元素依次入队,再将X,Y,Z入栈后,将栈中所有元素退出并依次入队,最后将队列中所有元素退出,则退队元素的顺序为______。
选择题 若fp是指向某文件的指针,且已读到文件末尾,则库函数feof(fp)的返回值是
选择题 有以下程序
#include<stdio.h>
int fun(int a,int b)
{ if(b==0) return a;
else return(fun(--a,--b));
}
main()
{ printf('%d\n',fun(4,2)); }
程序的运行结果是______。
选择题 现有定义int a;double b;float c;char k;,则表达式a/b+c-k的值的类型为______。