题目内容

#include using namespace std;class Test {int x = 0;public:Test() { x++; }int getX() const{ return x; }};int main(){Test t0;cout << sizeof(t0) << endl;cout << t0.getX() << endl;const Test t1;cout << t1.getX() << endl;return 0;}what is the output?

查看答案
更多问题

#include#includeusing namespace std;class String {char* str;public:String(const char* s);void set(int index, char c) { str[index] = c; }char* get() { return str; }~String() { delete str; }};String::String(const char* s){int l = strlen(s);str = new char[l + 1];strcpy(str, s);}int main(){String s1("Quiz");s1.set(0, 'q');cout << s1.get() <

#include#includeusing namespace std;class String {char* str;public:String(const char* s);void set(int index, char c) { str[index] = c; }char* get() { return str; }~String() { cout << str <<" object is deleted \n"; delete str; }};String::String(const char* s){int l = strlen(s);str = new char[l + 1];strcpy(str, s);}int main(){String s1("Quiz");s1.set(0, 'q');cout << s1.get() <

冷凝水排人污水系统时,宜有空气隔断措施;

A. 对
B. 错

冷凝水管道应采用塑料管或热镀锌钢管;当凝结水管表面可能产生二次冷凝水且对使用房间有可能造成影响时,凝结水管道宜采取防结露措施。

A. 对
B. 错

答案查题题库