MCQOPTIONS
Saved Bookmarks
| 1. |
Predict the output of following C++ program. #include using namespace std; class abc { static int x; public: abc() { x++; } static int getX() {return x;} }; int Test::x = 0; int main() { cout << abc::getX() << " "; abc t[5]; cout << abc::getX(); } |
| A. | 55 |
| B. | 55 |
| C. | 05 |
| D. | 50 |
| Answer» D. 50 | |