search
Log In
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
2 votes
1.2k views

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
1.2k views

3 Answers

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

2 votes
1 answer
1
1.9k views
When the inheritance is private, the private methods in base class are _____ in the derived class (in C++) inaccessible accessible protected public
asked Jul 30, 2016 in Object Oriented Programming jothee 1.9k views
1 vote
2 answers
2
1.7k views
Which of the following is incorrect in C++? when we write overloaded function we must code the function for each usage when we write function template we code the function only once it is difficult to debug macros templates are more efficient than macros
asked Jul 30, 2016 in Object Oriented Programming jothee 1.7k views
1 vote
1 answer
3
358 views
_____ allows to create classes which are derived from other classes, so that they automatically include some of its "parent's" members, plus its own members. Overloading Inheritance Polymorphism Encapsulation
asked Jul 25, 2016 in Object Oriented Programming jothee 358 views
4 votes
1 answer
4
2.6k views
Which one of the following is correct, when a class grants friend status to another class? The member functions of the class generating friendship can access teh members of the friend class All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship Class friendship is reciprocal to each other There is no such concept
asked Aug 14, 2016 in Object Oriented Programming jothee 2.6k views
...