单选题有以下程序
#include<stdio.h>
void fun(int x)
{if(x/2>1) fun(x/2);
printf("%d", x);
}
main()
{ fun(7); printf("n"); }
程序运行后的输出结果是______。
单选题若变量已正确定义,以下选项中非法的表达式是
单选题有以下程序 void fun1(char*p) main() {char*q; {char a[]={"Program"},*p; q=p; p=&a[3];fun1(p);printf("%s\n",a); while(*q!='\0') } {[*q)++;q++;}} 程序执行后的输出结果是
单选题有以下程序段:
#include <stdio.h>
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);
}
以下关于程序段执行情况的叙述,正确的是______。
单选题以下不能输出字符A的语句是(注:字符A的ASCII码值为65,字符a的ASCII码值为97)______。
单选题下面程序段中的循环体的执行次数是( )。 for(i=4;i<0;i--) for(j=1;j<=4;j++) sum=sum+j;
单选题有以下程序:
#include<stdio.h>
#define N 4
void fun(int a[][N], int b[])
{ int i;
for(i=0; i<N; i++) b[i]=a[i][i]-a[i][N-1-i]};
}
main()
{int x[N][N]={{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}, y[N], i;
fun(x, y);
for(i=0; i<N; i++) printf("%d, ", y[i]); printf("n");
}
程序运行结果为______。
单选题以下叙述中正确的是( )。
单选题定义结构体(联合)数组:
struct stu
{int num;
char name[20];
}x[5]={1,"ZHAO",2,"QIAN",3,"SUN",4,"LEE",5,"ZHOU"};
for(i=1;i<5;i++)
printf("%d%c",x[i].hum,x[j].name[2]);
其输出结果为______。
单选题下列程序的输出结果是______。 #define A 100 main() int i=0,sum=0; do if(i=(i/2)*2)continue; sum+=i; while(++i<A); print("%d/n",sum); A) 2500 B) 2050 C) 4 D) 0
单选题下列字符串是标识符的是______。
单选题有以下程序struct STU char name[10]; int num; float TotalScore; ; void f(struct STU *p) struct STU s[2]="SunDan",20044,550,"Penghua",20045,537, *q=s; ++p; ++q; *p=*q;main() struct STU s[3]="YangSan",20041,703,"LiSiGuo",20042,580; f(s); printf("%s %d %3.0f\n", s[1].name, s[1].num, s[1].TotalScore);程序运行后的输出结果是________。
单选题以下叙述中正确的是
单选题不属于对象构成成份的是______。
单选题下列描述中正确的是
单选题有以下程序
#include <stdio.h>
main()
{
int a=1,b=2,c=3,x;
x=(a^b)
printf("%d/n",x);
}
程序的运行结果是______。
单选题若有以下程序#include<stdio.h>main(){int a=1,b=2,c=3,d=4; if((a=2)&&(b=1))c=2; if((c==3)‖(d=-1))a=5; printf("%d,%d,%d,%d\n",a,b,c,d);}则程序的输出结果是
单选题下列叙述中,正确的是______。
A.软件测试应该由程序开发者来完成
B.程序经调试后一般不需要再测试
C.软件维护只包括对程序代码的维护
D.以上3种说法都不对
单选题有以下程序:
#include
int fun()
{ static int x=1;
x*=2:
return x:
}
main()
{ int i,s=1;
for(i=1;i<=3;i++)
s*=fun();
printf(“%d\n”,s);
}
程序的运行结果是( )。
单选题若有定义和语句:
int a,b;
scanf("%d,%d,",&a,&b);
以下选项中的输入数据,不能把值3赋给变量a、值5赋给变量b的是______。