完成下面类中成员函数的定义。#include [iostream] #include [string] using namespace std; class str {private: char *st; public: str(char *a) {set(a); } str & operator=(str &a) {delete st; set(a.st); return *this; } void show(){cout<<st<<endl;} ~str(){delete st;} void set(char *s)//初始化st {_____ strcpy(st,s); } }; void main() {str s1("he"),s2("she"); s1.show(),s2.show(); s2=s1; s1.show(),s2.show();}
完成下面类中成员函数的定义。#include [iostream] #include [string] using namespace std; class str {private: char *st; public: str(char *a) {set(a); } str & operator=(str &a) {delete st; set(a.st); return *this; } void show(){cout<<st<<endl;} ~str(){delete st;} void set(char *s)//初始化st {_____ strcpy(st,s); } }; void main() {str s1("he"),s2("she"); s1.show(),s2.show(); s2=s1; s1.show(),s2.show();}
f(st): st[]=st={:,:} f(st) (st[],st[]) 结果是
f(st): st[]=st={:,:} f(st) (st[],st[]) 结果是
传统光纤连接器有()? A: A.ST、SC、FC B: B.ST、SC、LC C: C.ST、LC、MU D: D.LC、MU、MT-RJ
传统光纤连接器有()? A: A.ST、SC、FC B: B.ST、SC、LC C: C.ST、LC、MU D: D.LC、MU、MT-RJ
f(st):<p style="padding-left: 50px;"> st[]=st={:,:}f(st)(st[],st[])结果是
f(st):<p style="padding-left: 50px;"> st[]=st={:,:}f(st)(st[],st[])结果是
def f(st): st.append('x') return st st=['a'] st=f(st) print(st) 结果是
def f(st): st.append('x') return st st=['a'] st=f(st) print(st) 结果是
列表st定义为: <br/>st A: st$name B: st[[1]] C: st["name"] D: st[["name"]]
列表st定义为: <br/>st A: st$name B: st[[1]] C: st["name"] D: st[["name"]]
智慧职教: st=[["a","b"],"c"]st[0][1]='d'print(len(st),st)结果是
智慧职教: st=[["a","b"],"c"]st[0][1]='d'print(len(st),st)结果是
st='abc234d' st=str(st)[2:-1] print(st) 结果是 A: c234 B: c234d
st='abc234d' st=str(st)[2:-1] print(st) 结果是 A: c234 B: c234d
SQL语句中删除表st的命令是_______ A: DROP TABLE st B: DELETE TABLE st C: DELETE st D: DROP st
SQL语句中删除表st的命令是_______ A: DROP TABLE st B: DELETE TABLE st C: DELETE st D: DROP st
经过以下栈的操作后,isEmpty(st)的返回值为()。initStack(st);push(st,a);push(st,b);pop(st,x);pop(st,y); A: a B: b C: 1 D: 0
经过以下栈的操作后,isEmpty(st)的返回值为()。initStack(st);push(st,a);push(st,b);pop(st,x);pop(st,y); A: a B: b C: 1 D: 0