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