A.support
B.sponsor
C.speed
D.screw
第1题
A.13
B.14
C.208
D.209
第2题
有以下程序: #include <stdio.h> union pw { int i; char ch[2]; } a; main() { a.ch[0]=13; a.ch[1]=0; printf("%d\n",a.i); } 程序的输出结果是(注意:ch[0]在低字节,ch[1]在高字节)()。
A.13
B.14
C.208
D.209
第3题
输入c2470f ? <回车> 后,下列程序的输出结果是________。 # include "stdio.h" int main() { char ch; long number=0; while((ch=getchar())<’0’||ch>’6’) ; while(ch!=’?’&&ch>=’0’&&ch<=’6’) { number="number*7+ch﹣’0’;" printf("%ld#",number); ch="getchar();" } return 0;>
第4题
下列程序运行后的输出结果是______。
#include<stdio.h>
main()
{ char ch[7]="56bcl2";
int i,s=0;
for(i=0;ch[i]>='0'&&ch[i]<='9';i++)
s=10*s+ch[i]-'0';
printf("s=%d\n",s);
}
第5题
以下程序的输出结果是 【 11 】。
#include <stdio.h>
main()
{ char *ch[4]={"red',"green","blue"};
int i=0;
while(ch[i] )
{ putchar(ch[i][0]); i++;)
}
第6题
下列程序的输出结果是______。
include<iostream.h>
include<string.h>
using namespace std;
void fun(const char*s,char &C) {c=s[strlen(s)/2];}
int main()
{
char str[]="ABCDE";
char ch=str[1];
fun(str,ch);
cout<<ch;
return 0;
}
第7题
下列程序的输出结果是【 】。
include<iostream>
include<cstring>
using namespace std;
void fun(const char *s,char &c){c=s[strlen(s)/2];}
int main()
{
char str[]="ABCDE";
char ch=str[1];
fun(str,ch);
cout<<ch;
return 0;
}
第8题
#include
main()
{ char *ch[4]={"red',"green","blue"};
int i=0;
while(ch[i] )
{ putchar(ch[i][0]); i++;)
}
第9题
下列程序运行时 , 若输入 labcedf2df< 回车 > 输出结果为【 1 0 】
#include <stdio.h>
main()
{ char a=0,ch;
while((ch=getch ar ())!='\n')
{ if(a%2!=0&&(ch>='a'&&ch<='z')) ch=ch-'a'+'A';
a++; putchar(ch);
}
printf("\n");
}
第10题
#include
main()
{ char ch[7]="56bcl2";
int i,s=0;
for(i=0;ch[i]>='0'&&ch[i]<='9';i++)
s=10*s+ch[i]-'0';
printf("s=%d\n",s);
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!