Home » C++ Programming » Objects and Classes

What will be the output of the following program? #include class CuriousTab { static int count; public: static void First(void) { count = 10; } static void Second(int x) { count = count + x; } static void Display(void) { cout<< count << endl; } }; int CuriousTab::count = 0; int main() { CuriousTab :: First(); CuriousTab :: Second(5); CuriousTab :: Display(); return 0; }

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!