首页 > 公务员考试
题目内容 (请给出正确答案)
[单选题]

已知“chars[]="hello";”,则下面叙述中正确的是()。

A.数组s的长度为5

B.元素s[2]的值为'e'

C.使用“cin>>s;”可以将从键盘上键入的字符串保存在数组s中

D.使用“intt[]=s;”可以定义数组t、并用s中各元素的值初始化t中的各元素

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“已知“chars[]="hello";”,则下面叙述中正确的…”相关的问题
第1题

下面程序执行后的输入是()。#include#include#defineM1"Hello"#defineM2",world!"#defineMsg10#defineMsg20voidmain(){chars[100]="HHHH"#ifMsg1strcat(s,M2)#elifMsg2strcpy(s,M1)#elsestrcpy(s,strcat(strcpy(s,M1),M2))#endifputs(s)}

A.HHHH

B.Hello,world!

C.HHHHHello

D.HHHH,world!

点击查看答案
第2题
下面程序的功能是()。#include#includeintfun(chars[])voidmain(){chars1[100]printf("?s1:")gets(s1)printf("%d/n",fun(s1))}intfun(chars[]){intifor(i=0s[i]i++)returni}

A.将字符串s1拷贝给s

B.将字符串s拷贝给s1

C.统计字符串s1中有效字符个数

D.将字符串s1连接到s末尾

点击查看答案
第3题
下面程序段的输出结果是_____。chars[8]="ABCD",*p=s;*++p='E';printf("

下面程序段的输出结果是_____。

chars[8]="ABCD",*p=s;

*++p='E';

printf("%s",p);

点击查看答案
第4题
String s = "hello";String t = "hello";char c[] = {'h','e

A.s.equals(t);

B.t.equals(c);

C.s==t;

D.t.equals(new String("hello"));

点击查看答案
第5题
以下选项中不能正确赋值的是()

A.char b[]={′H′,′e′,′l′,′l′,′o′,′!′};

B.char b[10];b="Hello!";

C.char b[10]= "Hello!";

D.char *str="Hello!";

点击查看答案
第6题
Receptionist:Hello,Spring Hotel.May I help you?Customer:__________?A.

Receptionist:Hello,Spring Hotel.May I help you?Customer:__________?

A.

点击查看答案
第7题
在使用MapReduce程序WordCount进行词频统计时,对于文本行“hellohadoophelloworld”,经过WordCount程序的Map函数处理后直接输出的中间结果,应该是下面哪种形式()。

A.<"hello",1,1>、<"hadoop",1>和<"world",1>

B.<"hello",2>、<"hadoop",1>和<"world",1>

C.<"hello",<1,1>>、<"hadoop",1>和<"world",1>

D.<"hello",1>、<"hello",1>、<"hadoop",1>和<"world",1>

点击查看答案
第8题
以下表达式的值为True的是()

A.'Hello'.islower()

B.'h' in 'Hello'

C.'b' in {'a':'b', 'c':'d', 'e':'f'}

D.eval('1')==int(1)

点击查看答案
第9题
_______“hello”,hereachedouthishand.A.SaidB.SayingC.TosayD.Say

_______ “hello”, he reached out his hand. A. SaidB. SayingC. To sayD. Say

点击查看答案
第10题
John: Hello, Maria!______. Maria: Yes, I'm pretty busy lately. How about your st

John: Hello, Maria!______.

Maria: Yes, I'm pretty busy lately. How about your studies?

点击查看答案
第11题
下列哪个是Java中有效的关键字()。

A.name

B.hello

C.false

D.good

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改