已知“chars[]="hello";”,则下面叙述中正确的是()。
A.数组s的长度为5
B.元素s[2]的值为'e'
C.使用“cin>>s;”可以将从键盘上键入的字符串保存在数组s中
D.使用“intt[]=s;”可以定义数组t、并用s中各元素的值初始化t中的各元素
A.数组s的长度为5
B.元素s[2]的值为'e'
C.使用“cin>>s;”可以将从键盘上键入的字符串保存在数组s中
D.使用“intt[]=s;”可以定义数组t、并用s中各元素的值初始化t中的各元素
下面程序执行后的输入是()。#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!
A.将字符串s1拷贝给s
B.将字符串s拷贝给s1
C.统计字符串s1中有效字符个数
D.将字符串s1连接到s末尾
下面程序段的输出结果是_____。
chars[8]="ABCD",*p=s;
*++p='E';
printf("%s",p);
A.s.equals(t);
B.t.equals(c);
C.s==t;
D.t.equals(new String("hello"));
A.char b[]={′H′,′e′,′l′,′l′,′o′,′!′};
B.char b[10];b="Hello!";
C.char b[10]= "Hello!";
D.char *str="Hello!";
Receptionist:Hello,Spring Hotel.May I help you?Customer:__________?
A.
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>
A.'Hello'.islower()
B.'h' in 'Hello'
C.'b' in {'a':'b', 'c':'d', 'e':'f'}
D.eval('1')==int(1)
_______ “hello”, he reached out his hand. A. SaidB. SayingC. To sayD. Say
John: Hello, Maria!______.
Maria: Yes, I'm pretty busy lately. How about your studies?