Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C++ Programming
»
Objects and Classes
What happens when we try to compile the class definition in following code snippet? class Birds {}; class Peacock : protected Birds {};
It will not compile because class body of Birds is not defined.
It will not compile because class body of Peacock is not defined.
It will not compile because a class cannot be protectedly inherited from other class.
It will compile succesfully.
Show Answer
Correct Answer:
It will compile succesfully.
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment