选择题 有以下程序段:
struct st
{ int x; int *y;} *pt;
int a[]={1,2}, b[]={3,4};
struct st c[2]={10,a,20,bt};
pt=c;
以下选项中表达式的值为11的是______。
选择题 以下程序的输出结果是______。
main()
{ int i,j,m=0;
for (i=1;i<=15;i+=4)
for(j=3; j<=19; j+=4) m++;
printf('%d\n',m);
}
选择题 支持子程序调用的数据结构是______。
选择题 有以下程序段:
int x=3:
do
{printf('%d',x-=2);}
while(!(--x));
其输出结果是 。
选择题 有以下程序:
#include <stdio.h>
#include <string.h>
typedef struct stu{
char name[10];
char gender;
int score;
}STU;
void f(char name[10],char gender,int score)
{ strepy(name,'Sun');
gender='m';
score=370;
}
main()
{ STU b={'Zhao','m',290},a={'Qian','f',350};
b=a;
printf('%s,%c,%d,',b.name,b.gender,b.score);
f(b.name,b.gender,b.score);
printf('%s,%c,%d\n',b.name,b.gender,b.score);
}
程序运行后的输出结果是
选择题 以下选项中,合法的是______。
选择题 设有一个商店的数据库,记录客户及其购物情况,由三个关系组成:商品(商品号,商品名,单价,商品类别,供应商),客户(客户号,姓名,地址,电邮,性别,身份证号),购买(客户号,商品号,购买数量),则关系购买的键为______。
选择题以下程序的功能是计算:。#include<stdio.h>main(){intn;floats;s=1.0;for(n=10;n>1;n--)s=s+1/n;printf('%6.4f\n',s);}程序运行后输出结果错误,导致错误结果的程序行是。
选择题 下列定义数组的语句中错误的是______。
选择题 若有以下程序:
#include <stdio.h>
main( )
{
int x=8;
for( ;x>0; x--)
{
if(x%3)
{
printf('%d,',x--);
continue;
}
printf('%d,',--x);
}
}
则程序的运行结果是______。
选择题 关于函数返回值,以下叙述正确的是______。
选择题 有以下程序:
#include <stdio.b>
main()
{ int x[3][3]={{2},{4},{6}},i,*q=x[0][0];
for(i=0;i<2;i++)
{ if(i==0)
x[i][i+1]=*q+1;
else
++q;
printf('%d',*q);
}
printf('\n');
}
程序运行后的输出结果是______。
选择题 下面程序有错误的行是______。
main()
{ int a[3]={1};
int i;
scanf('% d', a);
for(i=1; i<3; i++) a[0]=a[0]+a[i];
printf('a[0]=% d\n', a[0]);
}
选择题 下面不属于需求分析阶段任务的是______。
选择题 有以下程序:
#include<stdio.h>
main()
{ int c;
while((c=getchar )!='\n')
{switch(c-'2')
{ case 0:
case 1:putchar(c+4);
case 2:putchar(c+4);break;
case 3:putchar(c+3);
case 4:putchar(c+3);break;}}
printf('\n');}
从第一列开始输入以下数据,↙代表一个回车符。
27 43↙
程序的输出结果是 。
选择题 有以下程序:
#include<stdio.h>
main()
{ int a,b;
for(a=1,b=1;a<=100;a++)
{ if(b>=20)break;
if(b%3==1){b=b+3;continue;}
b=b-5;
}
printf('%d\n',a);
}
程序运行后的输出结果是______。
选择题 以下关于C语言数据类型使用的叙述中错误的是______。
选择题 有以下程序(注:字符a的ASCII码值为97):
#include<stdio.h>
main()
{char *s={'abc'};
do
{printf('%d', *s%10); ++s;}
while(*s);
}
程序运行后的输出结果是______。
选择题 有以下程序:
#include<stdio.h>
main()
{int m=1, n=2, *p=m, *q=n, *r;
r=p; p=q; q=r;
printf('%d, %d, %d, %d\n', m, n, *p, *q);
程序运行后的输出结果是______。
选择题 某二叉树的前序序列为ABCDEFG,中序序列为DCBAEFG,则该二叉树的后序序列为______。