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; }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!