网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

阅读下面程序,写出输出结果。

#include

using namespace std ;

class A

{

int a, b;

public :

A() { a = b = 0; }

A( int aa, int bb)

{

a = aa;

b = bb;

cout << a << ' ' << b << endl ;

}

};

int main()

{

A x, y(2,3);

return 0;

}


参考答案

更多 “ 阅读下面程序,写出输出结果。#includeusing namespace std ;class A{int a, b;public :A() { a = b = 0; }A( int aa, int bb){a = aa;b = bb;cout a b endl ;}};int main(){A x, y(2,3);return 0;} ” 相关考题
考题 在下面程序的画线处填上适当的内容,使程序执行后的输出结果为ABCD。 include using 在下面程序的画线处填上适当的内容,使程序执行后的输出结果为ABCD。include <iostream>using namespace std;class A{public:A( ){cout<<'A';}};class B: (11) {public:B( ){cout<<'B';}{;class C: (12) {public:C( ){cout<<'C';}};class D:public B,public C{public:D( ){cout<<'D';}};void main( ){D( );cout<<endl;}

考题 阅读下面程序,则执行后的输出结果为( )

考题 阅读以下程序,写出程序运行后的输出结果是 ______。includevoid main(){ char a[]={ 阅读以下程序,写出程序运行后的输出结果是 ______。 #include<iostream.h> void main(){ char a[]={'H','e','r','1',‘o’,'\0'}; int i, j; i=sizeof(a)/sizeof(char); j=strlen(a) cout<<i<<' '<<j; }A.6 6B.5 6C.1 5D.6 5

考题 阅读以下程序,写出程序运行后的输出结果是 ______。includevoid main(){char a[]={' 阅读以下程序,写出程序运行后的输出结果是 ______。 #include<iostream.h> void main(){ char a[]={'H','e','1','1','o','\0'}; int i,j; i=sizeof(a)/sizeof(char); j=strlen(a) cout<<i<<‘ ’<<j;A.6 6B.5 6C.1 5D.6 5

考题 下面代码的输出结果是x = 12.34;print(type(x))A.<class 'bool'>B.<class 'complex'>C.<class 'float'>D.<class 'int'>

考题 阅读下面的程序, 写出运行后输出的结果。 #include<iostream> using namespace std; class A { public: A(){cout<<"A";} }; class B :public A { public: B(){cout<<"B";} }; void main() { B b1; }

考题 下面代码的输出结果是‪‪‪‪‪‫‪‪‪‪‪‫‪‪‪‪‪‫‪‪‪‪‪‫‪‪‪‪‪‪‫ x = 12.34 print(type(x))A.<class 'complex'>B.<class 'float'>C.<class 'int'>D.<class 'bool'>

考题 下面代码的输出结果是() x = 12.34 print(type(x))A.<class ‘int’>B.<class ‘float’>C.<class ‘bool’>D.<class ‘complex’>

考题 下面代码的输出结果是: x = 12.34 print(type(x))A.<class 'float'>B.<class 'complex'>C.<class 'bool'>D.<class 'int'>