A.记录长度 B.文件的大小 C.联系的复杂程度 D.数据之间的联系方式
有三个关系R、S和T如下: 则由关系R和S得到关系T的操作是()
A.自然连接 B.交 C.投影 D.并
A.a%(int)(x-y)B.a=x!=y;C.(a*y)%bD.y=x+y=x
有以下程序 #include main() {int a=1,b=0; if(!a) b++; else if(a==0)if(a)b+=2; else b+=3; printf(”%d\n”,b); } 程序运行后的输出结果是()
A.0 B.1 C.2 D.3
A. switch(x%2) {cage 0:a++;break; case 1:b++;break; default:a++;b++; } B. switch((int)x/2.0) {ease 0:a++;break; case 1:b++;break; default:a++;b++; } C. switch((int)x%2) {case 0:a++;break; case 1:b++;break; default:a++;b++; } D. switch((int)(x)%2) {case 0.0:a++;break; case 1.0:b++;break; default:a++;b++; }
有以下程序 #include main() {int a=1,b=2; while(a<6){b+=a;a+=2;b%二10;} printf(”%d,%d\n”,a,b); } 程序运行后的输出结果是()
A.5,11 B.7,1 C.7,11 D.6,1
有以下程序 #include<stdio.h> main() {int y=10; while(y--); printf(”Y=%d\n”,Y); } 程序执行后的输出结果是()
A.y=0 B.y= -1 C.y=1 D.while构成无限循环
有以下程序 #include<stdio .h> main() {char s[」=”rstuv"; printf(”%c\n”,*s+2); } 程序运行后的输出结果是()
A.tuv B.字符t的ASCII码值 C.t D.出错
有以下程序 #include<stdio.h> #include<string.h> main() {char x[]=”STRING”; x[0」=0;x[1]=’\0’;x[2」=’0’; printf(”%d %d\n”,sizeof(x),strlen(x)); } 程序运行后的输出结果是()
A.6 1 B.7 0 C.6 3 D.7 1
有以下程序 #include<stdio.h> Int f(int x); main() {int n=1,m; m=f(f(f(n)));printf(”%d\n”,m); } int f(int x) {return x*2;} 程序运行后的输出结果是()
A.1 B.2 C.4 D.8
A.int N=10; int x[N]; B.# define N 10 int x[N]; C.int x[0..10]; D.int x[];
有以下程序 #include<stdio.h> void f(int *p); main() {int a[5]={1,2,3,4,5},*r=a; f(r);printf(”%d\n”;*r); } void f(int *p) {p=p+3;printf(”%d,”,*p);} 程序运行后的输出结果是()
A.1,4 B.4,4 C.3,1 D.4,1
有以下程序( strcat函数用以连接两个字符串) #include<stdio.h> #include<string .h> main() {char a[20]=”ABCD\OEFG\0”,b[]=”IJK”; strcat(a,b);printf(”%s\n”,a); } 程序运行后的输出结果是()
A.ABCDE\OFG\OIJK B.ABCDIJK C.IJK D.EFGIJK
有以下程序 #include<stdio.h> void fun(int x) {if(x/2>1)fun(x/2); printf(”%d”,x); } main() {fun(7);printf(”\n”);} 程序运行后的输出结果是
A.1 3 7 B.7 3 1 C.7 3 D.3 7
有以下程序 #include<stdio.h> int fun() {static int x=1; x+=1;return x; } main() {int i;s=1; for(i=1;i<=5;i++)s+=fun(); printf(”%d\n”,s); } 程序运行后的输出结果是()
A.11 B.21 C.6 D.120
有以下程序 #inctude<stdio.h> #include<stdlib.h> Main() {int *a,*b,*c; a=b=c=(int*)malloc(sizeof(int)); *a=1;*b=2,*c=3; a=b; printf(“%d,%d,%d\n”,*a,*b,*c); } 程序运行后的输出结果是
A.3,3,3 B.2,2,3 C.1,2,3 D.1,1,3
有以下程序 #include<stdio.h> main() {int s,t,A=10;double B=6; s=sizeof(A);t=sizeof(B); printf(“%d,%d\n”,s,t); } 在VC6平台上编译运行,程序运行后的输出结果是
A.2,4 B.4,4 C.4,8 D.10,6
若有以下语句 Typedef struct S {int g; char h;}T; 以下叙述中正确的是()
A.可用S定义结构体变量 B.可用T定义结构体变量 C.S是struct类型的变量 D.T是struct S类型的变量
有以下程序 #include<stdio.h> main() {short c=124; c=c_______; printf(“%d\n”、C); } 若要使程序的运行结果为248,应在下划线处填入的是
A.>>2 B.|248 C.&0248 D.<