根据下列程序的执行结果,可以断定划线部分的修饰符应为______。执行结果:i9a football is created.a football is created.i=10a football is destroyed.a football is created.i=20a football is destroyed.a football is destroyed.源程序:include<iostream.h>class Football{public:Football( ){cout<<"a football is created."<<endl;}~Football( ){tout<<"a football is destroyed."<<endl;}};void func(int i){______Football f1;Football f2;cout<<"i="<<i<<endl;}void main( ){func(10);func(20);}

根据下列程序的执行结果,可以断定划线部分的修饰符应为______。执行结果:

i9a football is created.

a football is created.

i=10

a football is destroyed.

a football is created.

i=20

a football is destroyed.

a football is destroyed.

源程序:

include<iostream.h>

class Football

{

public:

Football( ){cout<<"a football is created."<<endl;}

~Football( ){tout<<"a football is destroyed."<<endl;}

};

void func(int i)

{

______Football f1;

Football f2;

cout<<"i="<<i<<endl;

}

void main( )

{

func(10);

func(20);

}


相关考题:

下列程序的执行结果是______。 include int a; int sum_a(void) { a=a+5; return a; 下列程序的执行结果是______。include<lostream.h>int a;int sum_a(void){a=a+5;return a;}void main(void){a=a+sum_a( );cout<<a<<endl;}

下列程序的执行结果是______。 include include using namespace std; vo 下列程序的执行结果是______。include<iostream.h>include<iomanip.h>using namespace std;voidmain(){cout<<setfill('x')<<setw(10);cout<<"Hello"<<end1;}

为使该程序执行结果为10,那么应该在程序划线处填入的语句是()。includeusing namespac 为使该程序执行结果为10,那么应该在程序划线处填入的语句是( )。 #include<iostream> using namespace std; class MyClass { public: MyClass (int a) { x=a; } ___________ //取x值 private: int x; }; int main() { MyClass my(10); cout<<my.GetNum()<<end1; return 0; }A.return x;B.int GetNum(){ return x;}C.intreturn x;D.void GetNum(){return x;}

请阅读下列程序代码,然后将程序的执行结果补充完整。横线处应填写的内容是( )。 程序代码:执行结果: In Situation 0 no Exception caught in Proc finallyA.In Situation 1B.In SituationC.with CatchD.int iArray 1

执行下列程序后,屏幕上显示的结果是( )。A.2 3 4 5B.2 3 4 3C.4 5 4 5SXB 执行下列程序后,屏幕上显示的结果是( )。A.2 3 4 5B.2 3 4 3C.4 5 4 5D.2 3 2 3

下列程序执行后,其输出结果为( )。 A.1 1 1 4 1B.1 2 3 4 1C.1 2 1 4 1SX 下列程序执行后,其输出结果为( )。A.1 1 1 4 1B.1 2 3 4 1C.1 2 1 4 1D.1 1 1 4 1

下列程序的执行结果为______。include void main() { cout.fill(‘*’); tout.width(10 下列程序的执行结果为______。include<iostream.h>void main(){cout.fill(‘*’);tout.width(10);cout<<“hello”<<endl;)

执行下列代码,程序的输出结果是(用下划线表示空格): int a=29,b=100; cout <<setw (3) << a << b << endl;A.29_100B._29_100C.29100D._29100

4、下列说法正确的是()。A.C语言源程序中的注释对执行结果没有影响,所以注释是无用的。B.C语言源程序中的注释参加编译,对程序的执行结果有影响。C.C语言源程序中的注释参加编译,但是对程序的执行结果没有影响。D.C语言源程序中的注释不参加编译,对程序的执行结果没有影响。