Question 39Asked in UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)

Which of the following in C++, is inherited in a derived class from base class?

  1. AConstructor
  2. BDestructor
  3. CData Members
  4. DVirtual Methods
Show answerHide answer

Correct answer: (C) Data Members

Explanation

Data members in C++ is inherited in a derived class from base class. Constructor is a member function of a class which initialize objects of a class. In C++, constructor is automatically called when object create. It is special member function of the class. Destructor is a member function which destructs or deletes an object. Virtual methods is a method which is redefined (over- ridden) in derived class.

From UGC NET Computer Science PYQ, June 2015 (Paper II & III, Selected Questions)

This is question 39 of UGC NET Computer Science PYQ, June 2015 (Paper II & III, Selected Questions). 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.