Question 51

Assume the C++ definition : class circle : public point Which of the following is false?

Assume the C++ definition : class circle : public point Which of the following is false?
  1. A'Point' is the base class and 'circle' is the derived class.
  2. BThe colon (:) in the header of class definition indicates inheritance.
  3. CThe keyword 'public' indicates type of inheritance.
  4. DAll the public and protected members of class 'circle' are inherited as public and protected members, respectively, into class 'point'.
Show answerHide answer

Correct answer: (D) All the public and protected members of class 'circle' are inherited as public and protected members, respectively, into class 'point'.

Explanation

Inheritance flows from the base class to the derived class. The public and protected members of point are inherited into circle, not the other way round, so statement D is false.

From DSSSB TGT Computer Science Practice Set 1

This is question 51 of DSSSB TGT Computer Science Practice Set 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.