单选题有以下程序
#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;
}
程序运行后的输出结果是______。
单选题下面程序段的运行结果是 char str[]="ABC",*p=str; printf("%d/n",*(p+3));
单选题若有以下程序:
#include <stdio.h>
main( )
{ int i, sum;
for(i=1; i<6; i + + ) sum+ =1;
printf("%d/n",sum);
}
则程序运行后的输出结果是______。
单选题若有定义:int a[4][10];,则以下选项中对数组元素a[i][j]引用错误的是______。 (o<=i<4,0<=j<=10
单选题下列程序执行后的输出结果是( )。 #include<stdio.h> void func(int *a,int b[]) b[0]=*a+6; main() int a,b[5]; a=0;b[0]=3; func(&a,b); printf("%d/n",b[0]);
单选题读取二进制文件的函数调用形式为:fread(buffer, size, count, pf);,其中buffer代表的是______。
单选题有三个关系R、S和T如下:
R
A
B
C
a
l
2
b
2
1
c
3
1
S
A
D
c
4
T
A
B
C
D
c
3
1
4
则由关系R和S得到关系T的操作是______。
单选题有以下程序 #include main( ) { char p[20]={'a','b','c','d'},q[ ]="abc",r[ ]="abcde'; strcat(p,r) ;strcpy(p+strlen(q),q); printf("%d/n",strlen(p)); } 程序运行后的输出结果是 A)9 B)6 C)11 D)7
单选题有以下程序 main() { int m,n,p; scanf("m=% dn=% dp=%d",&m,&n,&p); printp("%d %d %d d/n",m,n,p); } 若想从键盘上输入数据,使变量m中的值为123,n中的值为456,p中的值为789,则正确的输入是______。
单选题有以下程序 int i, n; for(i=0; i<8; i++) n=rand()%5; switch(n) case 1: case 3: printf("%d/n", n); break; case 2: case 4: printf("%d/n", n)' continue; case 0: exit(0); printf("%d/n", n); 以下关于程序执行情况的叙述,正确的是______。
单选题有以下程序
#include
#define S1(z)4*z+4*(z)
#define s2(x,y)4*(x)*(y)+y*x
main()
{int a=1,b=2;
printf(“%d,”,S1(a+b));
prinff(”%d,”,S2(a,b)+S1(3));
printf(“%d”,s2(3+a,b+3));
}
程序执行后的输出结果是( )。
单选题以下程序的运行结果是______。
main()
{int a=-5,b=1,c=1;
int x=0,y=2,z=0;
if(c>0)x=x+y;
if(a<=0)
{if(b>0)
if(c<=0)y=x*y;}
else if(c>0)y=x-y;
else z=y;
printf("%d,%d,%d/n",x,y,z);}
单选题若有如下程序: main() int x=3,y=4,z; z=(x+(y-=X*X)); printf("%d,%d/n",y,z); 则程序执行后的输出结果是( )。 A) -4,2 B) -5,-2 C) -5,-1 D) 4,-2
单选题下列叙述中正确的是( )。 A) break语句只能用于switch语句 B) 在switch语句中必须使用default C) break语句必须与switch语句中的case配对使用 D) 在switch语句中,不一定使用break语句
单选题以下程序的输出结果是 chsr cchar(char ch) if(ch>='A'&&ch<='Z')ch=ch-'A'+'a'; return ch; main() char s[]=“ABC+abc=defDEF”,*p=s; while(*p) *p=cchar(*p); p++; printf(“%s/n”,s); A) abd+ABC=DEFdef B) abc+abc=defdefC) abcABCDEFdef D) abcabcdefdef
单选题有以下程序段 int i,n; for(i=0;i<8;i++) {n=rand()%5; switch(n) {case 1: case 3:printf("%d\n",n);break; case 2: case 4:printf("%d\n".n);continue; case 0:exit(0); } printf("%d\n",n);} 以下关于程序段执行情况的叙述,正确的是
单选题当没有指定C语言中函数形参的存储类别时,函数形参的存储类别是______。
单选题C语言用_______表示逻辑“真”值。
单选题设函数fun的定义形式为: vold fun (char ch, float x)…… 则以下对函数fun的调用语句中,正确的是( )。 A) fun("abc",3.0); B) t=fun('D',16.5);C) fun('65',2.8); D) fun(32,32);
单选题关系模型允许定义3类数据约束,下列不属于数据约束的是( )。