在下面程序横线处填上适当内容,使得程序的输出为9876。
include <iostream>
using namespace std;
template<class T>
void f([ ])
{
T t;
for (int i=0;i<n/2;i++)
{
t=a Ii];
a [i]=a[n-1-i];
a [n-1-i]=t;
}
}
int main ( )
{
int x[]={6,7,8,9};
f(x,4);
for (int i=0;i<4;i++)
cout<<x[i];
cout<<end1;
return 0;
}
[试题]在下面程序横线处填上适当内容,使程序输出为:55599。 include using namespace std; te在下面程序横线处填上适当内容,使程序输出为:55599。include <iostream>using namespace std;template <class TYPE>class HisClass{TYPE data;public:H.isClass(TYPE a, TYPE b, TYPE C) ;TYPE getData(){ return data;)};templa
[试题]在下面程序的横线处填上适当的语句,使该程序的输出为12。 include using namespace st在下面程序的横线处填上适当的语句,使该程序的输出为12。include <iostream>using namespace std;class Base{public:int a;B.ase(int i){a=i;}};class Derived: public Base{int a;public:D.erived(int x): Base(x),b(x+l){}void show(){
[试题]在下面的程序的横线处填上适当的语句,使该程序的输出为12。 include using namespace在下面的程序的横线处填上适当的语句,使该程序的输出为12。include<iostream.h>using namespace std;class Base{public:int a,b;B.ase(int i){a=i;}};class Derived:public Base{int a;public:D.erived(int x):Base(x),b(x+1){};void show(){
[试题]在下面程序的横线处填上适当的语句,使程序执行后的输出结果为ABCD。 include using nam在下面程序的横线处填上适当的语句,使程序执行后的输出结果为ABCD。include<iostream>using namespace std;classA{public:A.(){cout<<'A';}};class B:______{public:B.(){cout<<'B';}};class C:______{public:C(){cout<<'C';}};class D:pub
[单选题]在下列程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。includeusing name在下列程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。 #include<iostream> using namespace std; class A { public:A(){cout<<‘A’;} }; Class B: { public:B(){cout<<‘B’;} }; class C:virtual public A { public:C(){cout<<‘C’;} }
[试题]在下面程序的横线处填上______,使程序执行后的输出结果为1£¯2005。 include using nam在下面程序的横线处填上______,使程序执行后的输出结果为1/2005。include<iostream.h>using namespace std;class Date{Public:D.ate(int m=1,int y=0): month(m),year(y){}void Print(){cout<<month<<"/"<<year<<end1;}______operator
[试题]( 11 )请在下列程序的空白处,填上适当的内容:Import java. awt. *;Import java. util. *;C.lass BufferTest{Public static void main(string args[])Throws IOException{F.ileOutputStream unbuf=new FileOutputStream( “ test.one ” ) ;B.ufferedOutputStream buf=new ( 11 ) (new FileOu
[单选题]下面的程序运行后输出为()。include include main(){int a,b;float c;b = 5;下面的程序运行后输出为( )。 #include <stdio.h> # include <math.h> main() { int a,b; float c; b = 5;c = 6;c = b+7;b = c+1; a = sqrt((double)b+c); printf("%d,%f,%d",a+6,C,b); }A.11.000000,12.0000000,13.
[单选题]下面程序运行时输出结果为______。 include include class Rect { public: Rect(int下面程序运行时输出结果为______。include<iostream.h>includeclass Rect{public:Rect(int l, int w){length=l; width=w;)void Print(){cout<<"Area:"<<length*width<<end1;}void operator delete(void*p){free(
[主观题]在下面的横线上填上适当的分数。25cm=______m36dm² =______m²600g =______kg750ml =______L0.28dm =______dm258cm³=______dm ³