MCQOPTIONS
Saved Bookmarks
| 1. |
Which of the following statement is correct about the program given below? #include<iostream.h> #include<process.h> class IndiaBix { static int x; public: IndiaBix() { if(x == 1) exit(0); else x++; } void Display() { cout<< x << " "; } }; int IndiaBix::x = 0; int main() { IndiaBix objBix1; objBix1.Display(); IndiaBix objBix2; objBix2.Display(); return 0; } |
| A. | The program will print the output 1 2. |
| B. | The program will print the output 0 1. |
| C. | The program will print the output 1 1. |
| D. | The program will print the output 1. |
| E. | The program will report compile time error. |
| Answer» E. The program will report compile time error. | |