选择题 设有说明语句:chara='\72';则变量a______。
选择题 若有以下定义和语句:
#include<stdio.h>
char s1[10]='abcd!',*s2='\n123\\';
printf('%d%d\n',strlen(s1),strlen(s2));
则输出结果是______。
选择题 有以下程序:
#include<stdio.h>
void fun(char*c, int d)
{ *c=*c+1, d=d+1;
printf('%c, %c', *c, d);
}
main()
{char b='a', a=;A';
fun(b, a); printf('%c, %c\n', b, a);
}
程序运行后的输出结果是______。
选择题 以下能正确定义数组并正确赋初值的语句是______。
选择题下列定义变量的语句中错误的是______。A.int_int;B.doubleint_;C.charFor;D.
选择题 执行下述程序时,若从键盘输入6和8,结果为______。
main()
{ int a,b,s;
scanf('%d%d',a,b);
s=a;
if(s=b)s*=s;
printf('%d',s);}
选择题 有如下程序:
main()
{ int x=1, a=0, b=0;
switch(x)
{
case 0: b++;
case 1: a++;
case 2: a++; b++;
}
printf('a=%d, b=%d\n', a, b);
}
该程序的输出结果是______。
选择题 有以下程序:
#include <stdio.h>
main()
{
char c1,c2,c3,c4,c5,c6;
scanf('%c%c%c%c',c1,c2,c3,c4);
c5=getchar();
c6=getchar();
putchar(c1);
putchar(c2);
printf('%c%c\n',c5,c6);
}
程序运行后,若从键盘输入(从第1列开始):
123<回车>
45678<回车>
则输出结果是______。
选择题 有以下程序:
#include <stdio.h>
void fac2(int);
void fac1(int n)
{ printf('*');
if(n>0) fac2(n-1);
}
void fae2(int n)
{ printf('#');
if(n>0) fat2(--n);
}
main()
{fael(3);}
程序的运行结果是______。
选择题 有以下程序:
#include<stdio.h>
main()
{
char s[]={'012xy'};
int 1,n=0;
for(i=0;s[i]!=0;i++)
if(s[i]>='a's[i]<='z')n++;
printf('%d\n',n);
}
程序的运行结果是______。
选择题 有以下程序:
#include<stdio.h>
#define SUB(x,y) (x)*(y)
main()
{ int a=3,b=4;
printf('%d\n', SUB(a++,b++));
}
程序运行后的输出结果是
选择题 已知下面的程序段,正确的判断是______。
#define A3
#define B(A) (A+1)*a)
int a=3;
……
X=3*(A+B(7));
选择题 若有定义语句:int a[3][6];,按在内存中的存放顺序,a数组的第10个元素是______。
选择题 设x、y、z和k都是int型变量,则执行表达式:x=(y=4,Z=16,k=32)后,x的值为______。
选择题 语句printf('%d\n',strlen('\t\'\\\n\'\065\08AB'));的输出结果是
选择题 有以下程序:
#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);
}
程序运行后的输出结果是______
选择题 若变量已正确定义并赋值,则以下符合C语言语法的表达式是______。
选择题 为了建立如图所示的存储结构(即每个结点含两个域,data是数据域,next是指向结点的指针域),则在[]处应填入的选项是______。
选择题 设栈的存储空间为S(1:60),初始状态为top=61。现经过一系列正常的入栈与退栈操作后,top=25,则栈中的元素个数为______。
选择题 有以下程序:
#include<stdio.h>
#include<string.h>
struct A
{ int a; char b[10]; double c; };
void f(struct A t);
main()
{ struct A a={'1001, 'ZhangDa', 1098.0};
f(a); printf('%d, %s, %6.1f\n', a.a, a.b, a.c); }
void f(struct A t)
{t.a=1002; strcpy(t.b, 'ChangRong'); t.c=1202. 0; }
程序运行后的输出结果是______。