有以下程序 #include<stdio.h> main() {short c=124; c=c_______; printf(“%d\n”、C); } 若要使程序的运行结果为248,应在下划线处填入的是
A.>>2 B.|248 C.&0248 D.<
单项选择题若有以下语句 Typedef struct S {int g; char h;}T; 以下叙述中正确的是()
A.可用S定义结构体变量 B.可用T定义结构体变量 C.S是struct类型的变量 D.T是struct S类型的变量
单项选择题有以下程序 #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
单项选择题有以下程序 #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> 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
单项选择题有以下程序 #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
单项选择题有以下程序( 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
单项选择题以下不能将s所指字符串正确复制到t所指存储空间的是
单项选择题下列选项中,能够满足“若字符串s1等于字符串s2,则执行ST 要求的是
单项选择题有以下程序 #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
单项选择题若要定义一个具有5个元素的整型数组,以下错误的定义语句是