单项选择题
下面程序的输出结果是( )。 #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
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
问答题
使用VC++6.0打开考生文件夹下的源程序文件1.cpp,该程序运行时有错误,请改正程序中的错误,使得程序输出: member:1 member:10 member:100 注意:错误的语句在/********error********/的下面,修改该语句即可。其他的语句不能修改。 试题程序: #include inti=100; classTC { public: TC(inti) { cout<< member: < /********error********/ i=i+9: } voidPrint()const { cout<< member: < } private: inti; }; voidmain() { /********error********/ TCobj; inti(0); obj.Print(); /********error********/ cout<< member: < return; }
点击查看答案&解析
单项选择题
有以下结构体说明和变量的定义,且指针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;
点击查看答案&解析
相关试题
用VC++6.0打开考生文件夹下的源程序文...
下面程序的运行结果是( )。 #include...
有如下程序: #include usingnamespaces...
C++语言类体系中,不能被派生类继承的有...
有如下程序: #include voidmain() ...