Sail E0 Webinar
Question


What is correct about the following program?


#include
class Base
{
int x, y, z;
public:
Base()
{
x = y = z = 0;
}
Base(int xx, int yy = 'A', int zz = 'B')
{
x = xx;
y = x + yy;
z = x + y;
}
void Display(void)
{
cout
Options:
A .  The program will report compilation error.
B .  The program will run successfully giving the output 66 65.
C .  The program will run successfully giving the output 65 66.
D .  The program will run successfully giving the output 66 65 65 131 196.
E .  The program will produce the output 66 65 infinite number of times (or till stack memory overflow).
Answer: Option C



Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers