IndiaBIX
IndiaBIX
Start typing & press "Enter" or "ESC" to close
  • Home
  • Jobs
  • Results
  • Current Affairs
  • GK
  • Online Test
  • HR Interview
  • BLOG

What happens when we try to compile the class definition in following code snippet? class Birds {}; class Peacock : protected Birds {};

  • Home
  • Computer Science & Engineering
  • C++ Programming Questions and Answers
  • Objects and Classes
  • Discuss - 917
1. 

What happens when we try to compile the class definition in following code snippet?

class Birds {};
class Peacock : protected Birds {};

[A]. It will not compile because class body of Birds is not defined.
[B]. It will not compile because class body of Peacock is not defined.
[C]. It will not compile because a class cannot be protectedly inherited from other class.
[D]. It will compile succesfully.

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.
Workspace Report
Leave a Comment

Computer Science & Engineering :: C++ Programming Questions and Answers : More Exercises

  • OOPS Concepts
  • References
  • Constructors and Destructors
  • Objects and Classes
  • Functions Overloading

Questions & Answers

Aptitude Chemical Engineering Civil Engineering Computer Science & Engineering Current Affairs Data Interpretation Electrical & Electronics Engineering Electronics & Communication Engineering General Knowledge Logical Reasoning Mechanical Engineering Non Verbal Reasoning Verbal Ability Verbal Reasoning

Interviews

HR Interview

Jobs

Sarkari Jobs

Results

Rojgar ResultSarkari Result

Admission

Admission 2023

Admit Card

Admit Card 2023

Answer Key

Answer Key 2023
copyright
Privacy Policy
© 2025 IndiaBIX. All Rights Reserved.

Report