更多"下面程序的输出结果是( )。#include <iostream>u"的相关试题:
[单项选择]如下程序的输出结果是 #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;
class Sample
friend long fun(Sample s);
public:
Sample(long
A. x=a;
B. 16
C. 154
D. 34
[单项选择]有以下程序: #include <iostream> using namespace std; char *x[]={"First", "Second", "Third" }; void f(char *z[ ]) { cout<<*z++<<end1; } int main ( ) { char **y; y=x; f(y); return 0; }
A. 产生语法错误
B. First
C. Secpnd
D. Third
[单项选择]有以下程序
#include<iostream>
using namespace std;
class sample
private:
int x;
public:
sample(int