下面程序的运行结果是________。
#include
"iostream.h"
class test
{
private:
int
num;
float fl;
public:
test( );
int getint( ){return
num;}
float getfloat( ){return fl;}
~test( );
};
test::test( )
{
cout
<< "Initalizing default" << endl;
num=0;fl=0.0;
}
test::~test( )
{
cout <<
"Desdtructor is active" << endl;
}
void main( )
{
test
array[2];
cout << array[1].getint( )<< " "
<< array[1].getfloat( ) <<endl;
}
Initalizing default
Initalizing
default
0 0
Desdtructor is active
Desdtructor is active