根据下列程序的执行结果,可以断定划线部分的修饰符应为______。执行结果:
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);
}
第1题:
执行下列程序后,屏幕上显示的结果是( )。
A.2 3 4 5
B.2 3 4 3
C.4 5 4 5
D.2 3 2 3
第2题:
下列程序的执行结果为______。
include<iostream.h>
void main()
{
cout.fill(‘*’);
tout.width(10);
cout<<“hello”<<endl;
)
第3题:
4、下列说法正确的是()。
A.C语言源程序中的注释对执行结果没有影响,所以注释是无用的。
B.C语言源程序中的注释参加编译,对程序的执行结果有影响。
C.C语言源程序中的注释参加编译,但是对程序的执行结果没有影响。
D.C语言源程序中的注释不参加编译,对程序的执行结果没有影响。
第4题:
下列程序执行后,其输出结果为( )。
A.1 1 1 4 1
B.1 2 3 4 1
C.1 2 1 4 1
D.1 1 1 4 1
第5题:
执行下列代码,程序的输出结果是(用下划线表示空格): int a=29,b=100; cout <<setw (3) << a << b << endl;
A.29_100
B._29_100
C.29100
D._29100