

MCQOPTIONS
Saved Bookmarks
1. |
Which among the following is correct for the class defined below? class student { int marks; public: student(){} student(int x) { marks=x; } }; main() { student s1(100); student s2(); student s3=100; return 0; |
A. | Object s3, syntax error |
B. | Only object s1 and s2 will be created |
C. | Program runs and all objects are created |
D. | Program will give compile time error |
Answer» D. Program will give compile time error | |