单项选择题
下面程序的输出结果是
#include<iostream.h>
#include<string.h>
void main()
char p1[10],P2[10];
strcpy(p1,"abc");
strcpy(p2,"ABC");
char str[50]="xyz";
strcpy(str+2,strcat(P1,p2));
cout<<six;
A.xyzabcABC
B.zabcABC
C.xyabcABC
D.yzabcABC
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下面程序的结果为 #include<iostream.h> int C; class A private: int a; static int b; public: A() a=0;c=0; void seta()a++; voidsetb()b++; voidsetc()c++; void display() cout << a << << b << “ ” << c; ; int A∷b=0; void main() A a1,a2; a1.seta(); a1.setb(); a1.setc(); a2.seta(); a2.seth(); a2.setc(); a2.display();
A.1 2 1
B.1 2 2
C.1 1 2
D.2 2 2
点击查看答案&解析
单项选择题
下列程序中画线处应填入的语句是 class Base public: void fun()cout<< Base of fun <<end1: ; class Derived:public Base void fun() _______ 显示基类的成员函数fun cout<< Derived of fun <<end1; ;
A.fun();
B.Base.fun();
C.Base∷fun();
D.Base- >fun();
点击查看答案&解析
相关试题
以下程序的输出结果是 #include<iostrea...
下面程序的功能是把316表示为两个加数的...
下面程序段的运行结果是 void main() ...
设有数组定义:char array[]= China ...
函数fun的返回值是 fun(char*a,char*b...