单选题设有以下定义和语句: char str[20]="Program", *P; p=str; 则以下叙述中正确的是( )。 A) *p与str[0]中的值相等 B) str与p的类型完全相同 C) str数组的长度和p所指向的字符串长度相等 D) 数组str中存放的内容和指针变量p中存放的内容相同
单选题有以下程序 #include main(){int x=1,y=0,a=0,b=0; switch(x){case 1:switch(y) {case 0:a++;break; case 1:b++;break;} case 2:a++;b++;break;} printf("a=%d,b=%d\n",a,b); } 程序运行后的输出结果是
单选题某一微机的地址总线为20位,其可访问的最大空间地址为 ( )
单选题计算机高级语言程序的运行方法有编译执行和解释执行两种,以下叙述中正确的是______。
单选题以下程序的输出结果是______。
void fun(int*a, int i, int j)
{ int t;
if(i<j)
{t=a[i]; a[i]=a[j]; a[j]=t;
i++; j--;
fun(a, i, j);
}
}
main()
{int x[]={2, 6, 1, 8}, i;
fun(x, 0, 3);
for(i=0; i<4; i++) printf("%2d", x[i]);
printf("/n");
}
单选题分析下列程序: #include<stdio.h> main() int *p1,*p2,*p; int a=6,b=9; p1=&a;p2=&b; if(a<b)p=p1;p1=p2;p2=p; printf("%d,%d",*p1,*p2); printf("%d,%d",a,b); 程序的输出结果为( )。
单选题以下选项中能表示合法常量的是______。
单选题面向对象设计方法的主要特征是( )。
单选题在下列几种排序方法中,要求内存量最大的是______。
单选题请阅读以下程序: #include<stdio.h> #include<string.h> void fun(int b[]) main() { static int i=0; { int k,a[5]={1,3,5,4,9}; Do{ b[i]+=b[i+1]; fun(a); }while(++i<2);} for(k=0;k<5;k++)printf("%d",a[k]);}上面程序的输出是( )。
单选题39.有以下定义:int a;long b;double x,y;则以下选项中正确的表达式是( )。
单选题关于结构体说明和变量定义中,正确的是( )。
单选题有以下程序:
#include <stdio.h>
main( )
{
chair ch="B";
while (ch<"E")
{
printf("%d", ch-"A");
ch++;
}
printf("/n");
}
程序运行后的输出结果是______。
单选题有以下程序
#include <stdio.h>
void fun2(char a,char b)
{
printf("%c%c",a,b);
}
char a="A",b="B";
void fun1()
{
a="C";
b="D";
}
main()
{
fun1();
printf("%c%c",a,b);
fun2("E","F");
}
程序的运行结果是______。
单选题有以下程序 int f(int m) main(){int n=0; {static int n=0; printf("%d,",f(++n)); n+=m;return n;} printf("%d\n",f(n++));} 程序运行后的输出结果是
单选题对于循环队列,下列叙述中正确的是______。
单选题若有下列定义(设int类型变量占2个字节): int i=8,j=9; 则下列语句: printf("i=%u,j=%x/n".i,j); 输出的结果是( )。 A) i=8,j=9 B) 8.9 C) 89 D) i=8,i=8
单选题若有以下的说明和语句,则在执行for语句后,*(*(pt+1)+2)表示的数组元素是______。
int t[3][3], *pt[3], k; for(k=0; k<3; k++)pt[k]=
单选题有以下程序: #include <string.h> 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
单选题有以下程序 #include<stdio.h> #include<string.h> typedef structchar name[9];char sex;float score[2];)STU; STU f(STU a) STU b="Zhao",'in',85.0,90.0);int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=b.score[i]; return a; main() STU c="Qian",'f',95.0,92.0,d; d=f(c);printf("%s,%c,%2.0f,%2.0f",d.name,d.sex,d.score[0],d.score[1]); 程序的运行结果是( )。 A.qian,f,95,92 B.qian,m,85,90 C.ZhaO,m,85,90 D.Zhao,f,95,92