A.Because she thought the apartment was too small.
B.Because it was the first apartment she had seen.
C.Because her husband had not seen it.
D.Because the rent was too high.
第1题
若有如下程序: main() {int a=6;char ch=c; printf("%d\n",(a&2)&&(ch<'m'));} 则程序运行后的输出结果是()
A.0
B.1
C.2
D.3
第2题
若有如下程序: int m=1; main() { int t=0,s=0; {int m=4;s+=m;) t+=m; printf("%d,%d\n",s,t); } 则程序运行后的输出结果是()。
A.1,1
B.1,4
C.4,1
D.4,4
第3题
若有如下程序: void sub() {static int x=6; x/=2;printf("%d",x); } main() {int m; for(m=0;m<=2;m++) sub(); } 则程序运行后的输出结果是【 】。
第4题
若有如下程序: void sub() { static int x=8; x/=2;printf("%d",x); } main() { int m; for(m=0;m<2;m++) sub();} 则程序运行后的输出结果是【 】.
第5题
下列程序运行结果是 。 #include <string.h> class Base{ char msg[30]; protected : int n; public : Base(char s[],int m=0) : n(m) { strcpy(msg,s); } void output(void) { cout< <n> < <endl> < <msg> < <endl; } }; derived1 : public base{ int n; derived1(int m="20)" base("base",m-2) { n="m;" void output(void) base::output(); derived2 derived1{ derived2(int derived1(m-1) output() derived1::output(main(d; d.output(>
第6题
A.0
B.1
C.2
D.3
第7题
若有如下程序: sub(int *t,int a[3][4]) { int m,n; for(m=0;m<3;m++) for(n=0;n<4;n++) { *t=a[m][n];t++;} } main() { int*t,s[3][4)={{1,2,3),{4,5,6),{7,8,9}}; t=(int*)malloc(50); sub(t,s); printf("%d,%d\n",t[4],t[7]); } 则程序运行后的输出结果是()。
A.4,7
B.4,0
C.5,8
D.程序错误
第8题
下面的函数用于实现将一个字符串按逆序存放。
Void convert(char s[])
{
char m:
int i,j;
for(i=0,j=strlen(s);i<______;i++,j--)
{
m=s[i];
s[i]=______;
s[j-1]=m;
}
printf("%s\n",s);
}
第9题
若有以下程序 #include <stdio.h> #include <string.h> typedef struct stu { char name[10], gender; int score; } STU; void f(char *p ) { strcpy(p, "Qian" ); } main() { STU a={"Zhao", 'm', 290}, b; b=a; f(b.name); b.gender = 'f'; b.score = 350; printf("%s,%c,%d,", a.name, a.gender, a.score); printf("%s,%c,%d\n", b.name, b.gender, b.score); } 则程序的输出结果是()
A、Zhao,m,290,Qian,f,350
B、Zhao,m,290, Zhao,m,290
C、Qian,f,350,Qian,f,350
D、Zhao,m,290,Zhao,f,350
第10题
下面程序的运行结果是:_________。
#include "stdio.h"
#define N 20
void rr(int *p)
{
int *s=p+N-1,m;
while(p<s)
{m=*p;
*p++=*s;
*s--=m; }
return;
}
void main(void)
{int i,a[N];
for(i=0;i<N;i++)
a[i]=i*2;
rr(a);
while(i>0)
{printf("%3d",a[i-1]);
i=i-5;
}
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!