UGC-NET | UGC NET CS 2015 Jun – II | Question 12
Which of the following, in C++, is inherited in a derived class from base class ?
(C) data members
(D) virtual methods
- Data members in C++ is inherited in a derived class from base class
- Constructor is a member function of a class which initializes objects of a class. In C++,Constructor is automatically called when object(instance of class) 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-riden) in derived class.
So, option (C) is correct.
Quiz of this Question