in Object Oriented Programming recategorized by
4,745 views
2 votes
2 votes

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

  1. constructor
  2. destructor
  3. data members
  4. virtual methods
in Object Oriented Programming recategorized by
4.7k views

3 Answers

1 vote
1 vote
ans is C only data members(if they are not private) are inherited in a derived class
0 votes
0 votes
only data members can be inheritable
0 votes
0 votes
  • 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.

Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true