1.

What will be the output of the following program?

#include<iostream.h> class IndiaBix
{ int x, y; public: IndiaBix(int xx) { x = ++xx; } ~IndiaBix() { cout<< x - 1 << " "; } void Display() { cout<< --x + 1 << " "; } };
int main()
{ IndiaBix objBix(5); objBix.Display(); int *p = (int*) &objBix; *p = 40; objBix.Display(); return 0; }

A. 6 6 4
B. 6 6 5
C. 5 40 38
D. 6 40 38
E. 6 40 39
Answer» E. 6 40 39


Discussion

No Comment Found

Related MCQs