单项选择题
下面程序的输出结果是( )。 #include #include voidmain() { charp1[10],p2[10]; strcpy(p1,"abc"); strcpy(p2,"ABC"); charstr[50]="xyz": strcpy(str+2,strcat(p1,p2)); cout< }
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下结构体说明和变量的定义,且指针P指向变量a,指针q指向变量b。则不能把结点b连接到结点a之后的语句是()。 structnode {chardata; structnode*next; }a,b,*p=&a,*q=&b;
A.a.next=q;
B.next=&b;
C.p->next=&b;
D.(*p).next=q;
点击查看答案&解析
单项选择题
有如下程序: #include usingnamespacestd; classB{ public: virtualvoidshow(){coutshow(); }voidfun2(B&ref){ref.show(); }voidfun3(BB){b.show(); } intmain(){ Bb,*p=newD; Dd; funl(p); fun2(b); fun3(d); return0; } 程序的输出结果是( )。
A.BBB
B.BBD
C.DBB
D.DBD
点击查看答案&解析
相关试题
下面程序的运行结果是( )。 #include...
有如下程序: #include usingnamespaces...
C++语言类体系中,不能被派生类继承的有...
有如下程序: #include voidmain() ...
设有程序段: intk=10。 while(k=O...