Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
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; }
0
5
10
15
The program will report compile time error.
Show Answer
Correct Answer:
15
← Previous Question
Next Question→
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment