1.

Which of the following statement is correct about the program given below? #include class IndiaBix { int x, y; public: IndiaBix() { x = 0; y = 0; } IndiaBix(int xx, int yy) { x = xx; y = yy; } IndiaBix(IndiaBix *objB) { x = objB->x; y = objB->y; } void Display() { cout<< x << " " << y; } }; int main() { IndiaBix objBix( new IndiaBix(20, 40) ); objBix.Display(); return 0; }

A. The program will print the output 0 0 .
B. The program will print the output 20 40 .
C. The program will print the output Garbage Garbage .
D. The program will report compile time error.
Answer» C. The program will print the output Garbage Garbage .


Discussion

No Comment Found

Related MCQs