c++题写出下列程序段的输出结果______________。 string s1 = "123"; s1 += "abc"; cout<<s3?

写出下列程序段的输出结果______________。

string s1 = "123";

s1 += "abc";

char s3[10];

strcpy(s3,s1.c_str());

cout<<s3;

第1个回答  2020-04-13
程序段 string s1 = "123"; s1 += "abc"; cout<<s1;的输出是:
123abc
第2个回答  2020-04-13
是将abc追加到123的后面,然后吧s1在赋给s3,输出s3应该还是123abc
第3个回答  2020-04-12

123abc

本回答被提问者采纳