A Japanese-style. conversation,【C12】______, is not at all like tennis or volleyball. It's like bowling. You【C13】______for your turn. And you always know your【C14】______in line. It depends on such things as whether you are older or younger, a close friend or a relative stranger【C15】______the previous speaker, in a senior or junior position, and so on. When your turn comes, you【C16】______up to the starting line with your bowling ball, and【C17】______bowi it. Everyone else stands back and watches politely, whispering【C18】______. Everyone waits until the ball has reached the end of the alley, and watches to see if it【C19】______down all the pins, or only some of them, or none of them. There is a pause, while everyone registers your【C20】______.
【C1】
A.play
B.game
C.round
D.set
第1题
有以下程序: #include <iostream> #include <string> using namespace std; class base { private: char baseName[10]; public: base () { strcpy (baseName, "Base"); } virtual char *myName() {
A.DerivedBase
B.BaseBase
C.DerivedDerived
D.BaseDerived
第2题
运行程序,程序运行结果是()。 #include <iostream> #include <string> using namespace std; int main() { string a="string",*p=&a; cout<
< <endl; return> A、s
B、string
C、变量a的地址
D、变量p的地址
</endl;>
第3题
有以下程序: #include <iostream> #include <string> using namespace std; int main () { char s[]="\n123\\"; cout<<strlen (s) <<", "<<sizeof (s) <<end1; return 0; }
A.赋初值的字符串有错
B.6,7
C.5,6
D.6,6
第4题
以下程序的运行结果是【 】。
include<iostream>
include<string>
using namespace std;
void main(){
chara[10]="China",b[]="Chin",c[]="ese";
cout<<strlen(strcat(strcpy(a,b),c))<<endl;
}
第5题
有以下程序: #include <iostream> #include <string> using namespace std; int main () { char b1[8] = "abcdefg"; char b2[8],*pb=b1+3; while (--pb>=b1) strcpy (b2, Pb) ; cout<<strlen (b2) <<end1; return 0; } 程序运行后的输出结果是()。
A.8
B.3
C.1
D.7
第6题
根据C++最新标准,要想在 main() 函数中使用语句 std::cout << std::string("Aloha World!") << "\n"; cout << "Welcome to C++!"s << endl; // C++14 字符串字面量,包含在特殊的名字空间中正确地在屏幕上输出信息,需要在 main() 函数前面加上哪些语句?(不考虑编码规范,仅仅保证编译正确)
A、#include <iostream> #include <string> using namespace std; using namespace std::string_literals;
B、#include <iostream> #include <string> using std::cout; using std::endl; using namespace std::string_literals;
C、#include <iostream> #include <string> using namespace std;
D、#include <iostream> #include <string> #include <string_view> using namespace std::string; using namespace std::string_literals;
E、#include <iostream> #include <string> #include <string_view> using std::string; using namespace std::string_literals;
第7题
第8题
A、#include <iostream> #include <string> using namespace std::string_literals; int main() { const char* s = R"Hello World"; std::cout << s; } 输出:Hello World
B、#include <iostream> #include <string> using namespace std::string_literals; int main() { const char* s = R"(Hello\n World)"; std::cout << s; } 输出: Hello\n World
C、#include <iostream> #include <string> using namespace std::string_literals; int main() { const char* s = R"Hello(Hello\n World)Hello"; std::cout << s; } 输出: Hello\n World
D、#include <iostream> #include <string> using namespace std::string_literals; // main().......... std::string s1 = "Hello\0World"; auto s2= "Hello\0World"s; s1.size()的值是5 s2.size()的值是11
E、#include <iostream> #include <string> using namespace std::string_literals; // main().......... auto s1 = "Hello\0World"s; s1的类型是 const char*
第9题
以下程序的输出结果是 。 #include <iostream> #include <iomanip> using namespace std; void main() { int i; for (i=1;i>=0;) cout< <i--;>
第10题
有以下程序: #include <iostream> #include <fstream> using namespace std; int main () { ofstream ofile; char ch; ofile.open ("abc.txt"); cin>>ch; while (ch!='#' ) { cin>>ch; ofile.put(ch);
A.程序编译时出错
B.abc#
C.abc
D.#
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!