The difference between the control group and the experimental group was ______.
A.the training that parents received
B.the age of the children
C.the books that were read
D.the number of the children
第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 arr[2][4]; strcpy(arr[0],"you"); strcpy(arr[1],"me"); arr[0][3]='&'; cout<<arr[0]<<end1; return 0; } 执行后的输出结果是()。
A.you&me
B.you
C.me
D.err
第6题
第7题
根据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;
第8题
以下程序的输出结果是 。 #include <iostream> #include <iomanip> using namespace std; void main() { int i; for (i=1;i>=0;) cout< <i--;>
第9题
有以下程序: #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.#
第10题
下面程序的输出结果是()。 #include<iostream> #include<string> using namespace std; void main(){ charp1[10],p2[10]; strcpy(p1,"abc"); strcpy(p2,"ABC"); charstr[50]="xyz"; strcpy(str+2,strcat(p1,p2)); cout<<str; }
A.xyabcABC
B.yzabcABC
C.xyzabcABC
D.zabcABC
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!