更多"下列程序的输出结果是 #include'iostream' usi"的相关试题:
[单项选择]如下程序的输出结果是 #include<iostream> using namespace std; class A{ public: A( ){cout<<"A";} }; class B{public:B( ){cout<<"B";}}; class C://public A{ B b; public: C( ){cout<<"C";} }; int main( ){C obj;return 0;}
A. CBA
B. BAC
C. ACB
D. ABC
[单项选择]以下程序的输出结果是 #include<iostream> using nameSpace std; int main( ) { cout.fill('*'); cout.width(5); cout<<hex<<100<<end1; return 0; }
A. **100
B. ***64
C. 100**
D. 64***
[单项选择]下列程序的输出结果是 #include"iostream" using namespace std; int Max(int a,int b) { if (a > b) return a; else return b; } void main( ) { int m,n; m=10,n=5; int max=Max(m,n); cout<<max<<endl; }
A. 10
B. 程序有误
C. 1
D. 0
[单项选择]以下程序的输出结果是#include <iostream>using namespace std;int main( ){ cout.fill('*'); cout.width(5); cous<<hex<<100<<end1; return 0;}
A. **100
B. ***64
C. 100**
D. 64***
[单项选择]下面程序的输出结果是( )。#include <iostream>using namespace std;void main( ){int s;for(int k=2;k<6;k+=2)s=1;for(int j=k; j<6;j++) s+=j;cout<<s<<end1;
A. 9
B. 1
C. 11
D. 10
[单项选择]有以下程序: #include <iostream> using namespace std; int main( ) { int intone; int &rInt=intone; intone=5; rInt=7; cout<<intOne<<","<<rInt<<end1; return 0; } 上述程序执行后的输出结果是( )。
A. 5,7
B. 7,5
C. 5,5
D. 7,7
[单项选择]有如下程序: #include<iostream> using namespace std; class A{ public: static int a; void init( ){a=l;} A(int a=2){init( );a++;} }; int A::a=0; A obj; int main( ){ cout<<obj.a; return 0; } 程序的输出结果是
A. 0
B. 1
C. 2
D. 3