1.

Which of the following statement is correct about the program given below?

#include<iostream.h> class Bix
{ int x; public: Bix(); void Show() const; ~Bix(){}
};
Bix::Bix()
{ x = 5;
}
void Bix::Show() const
{ cout<< x;
}
int main()
{ Bix objB; objB.Show(); return 0; }

A. The program will print the output 5.
B. The program will print the output Garbage-value.
C. The program will report compile time error.
D. The program will report runtime error.
Answer» B. The program will print the output Garbage-value.


Discussion

No Comment Found

Related MCQs