See More
Discover More

Bank PO Free Mock (3311) Persons (2816) Freshers (2701) Experienced (2572) Chemical Engineering Basics (2430) Computer Fundamental Miscellaneous (2254) Chemical Engineering Basics (1995) Networks Analysis And Synthesis (1892) Upsc Civil Service Exam Questions (1877) Communication Systems (1867) Digital Electronics (1836) Computer Fundamentals (1668) Analog Electronics (1564) Exam Question Papers (1476) Environmental Science (1456) Financial Management (1412) Java (1372) Fluid Mechanics (1316) Entrance Exams (1296) Campus Interviews (1272)
See More
  1. What happens when we try to compile the class definition in following code snippet? class Birds {}; class Peacock : protected Birds {};

  1. It will not compile because class body of Birds is not defined.
  2. It will not compile because class body of Peacock is not defined.
  3. It will not compile because a class cannot be protectedly inherited from other class.
  4. It will compile succesfully.

Correct Answer:
D. It will compile succesfully.

Similar Questions

To Subscribe To View More & Chance to Win
iPhone X

what's your interest