选择题 有以下程序段
#include<stdio.h>
int j; float y; char name[50];
scanf('%2d%f%s',j,y,name);
当执行上述程序段,从键盘上输入55566 7777123后,y的值为______。
选择题 以下选项中不能用作C语言程序合法常量的是______。
选择题 假设有语句sizeof(double),则它是______。
选择题 下列程序的输出结果是______。
main()
{int i=1, j=2, k=3;
if(i++==1(++j==3==||k++==3))
printf('%d%d%d\n', i, j, k);
}
选择题 某二叉树共有730个结点,其中度为1的结点有30个,则叶子结点个数为______
选择题 有以下程序:
#include<stdio.h>
void fun(int*s,int n1,int n2)
{
int i,j,t;
i=n1;j=n2;
while(i<j)
{
t=s[i];s[i]=s[j];s[j]=t;i++;j--;
}
}
main()
{
int a[10]={1,2,3,4,5,6,7,8,9,0},k;
fun(a,0,3);fun(a,4,9);fun(a,0,9);
for(k=0;k<10;k++)
printf('%d',a[k]);
printf('\n');
}
程序运行后的输出结果是______。
选择题 以下选项中,能正确定义二维数组的是______。
选择题 下列说法中,不正确的是______。
选择题 以下叙述中正确的是______。
选择题 下面不能作为软件需求分析工具的是______。
选择题 有以下程序
#include<stdio.h>
main()
{int i,j;
for(i=3;i>=1;i--)
{for(j=1;j<=2;j++)printf('%d',i+j);
printf('\n');
}
}
程序的运行结果是______。
选择题 下面程序的功能是把316表示为两个加数的和,使两个加数分别能被13和11整除,请选择填空。
#include<stdio.h>
main()
{ int i=0,j,k;
do{i++;k=316-13*i}while(______);
j=k/11; printf('316=13*%d+11,%d”,i,j);
}
选择题 阅读下列程序,则运行结果为
#include 'stdio.h'
fun()
{static int x=3;
x++;
return x;}
main()
{int i,x;
for(i=0;i<3;i++)
x=fun();
printf('%d\n',x);}
选择题 有以下程序:
#include <stdio.h>
void f1(char *a,char b){ char c;c=*a;*a=b;b=c;}
void f2(char a,char b){ char c; c=a;a=b;b=c;)
void f3(char*a,char*b){ char c;c=*a;*a=*b;*b=c;)
main()
{ char t1,t2;
t1='A';t2='B';f3(t1,t2);putchar(t1);putchar(t2);
t1='A';t2='B';f2(t1,t2);putchar(t1);putchar(t2);
t1='A';t2='B';f1(t1,t2);putchar(t1);putchar(t2);
printf('\n');
}
程序运行后的输出结果是______。
选择题 若有定义语句:int year=2009,*p=year;,以下不能使变量year中的值增至2010的语句是______。
选择题 有以下程序
#include <stdio.h>
main()
{ int x;
scanf('%d',x);
if(x<=3);else
if(x!=10) printf('%d\n',x);
}
程序运行时,输入的值在哪个范围才会有输出结果______。
选择题 C语言可执行程序的开始执行点是______。
选择题 以下描述中,不是线性表顺序存储结构特征的是______。
选择题 有如下程序:
#include <stdio.h>
main()
int a=0,*ptr;
ptr=a;
*ptr=3;
a=(*ptr)++;
printf('%d,%d\n',a,*ptr);
}
程序运行后的输出结果是______。
选择题 有以下程序:
#include <stdio.h>
main()
{ int a=0,b=0,e=0,d=0;
if(a=1) b=1;c=2;
else d=3;
printf('%d,%d,%d,%d\n',a,b,c,d);
}
程序输出
