Home » C++ Programming » Objects and Classes

Which of the following statement is correct about the program given below? #include class CuriousTab { static int x; public: static void SetData(int xx) { x = xx; } void Display() { cout<< x ; } }; int CuriousTab::x = 0; int main() { CuriousTab::SetData(33); CuriousTab::Display(); return 0; }

Correct Answer: The program will report compile time error.

← Previous Question Next Question→

More Questions from Objects and Classes

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion