Which of the following cannot be inherited ?

A. Friend

B. Static

C. Destructor

D. Constructor

Answer : C. Destructor

Explanation :

  • Friend Class – A friend class can access private and protected members of other class in which it is declared as friend. It is sometimes useful to allow a particular class to access private members of other class.
  • Constructor – A 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.
  • Static – Static categories are sealed and thus can’t be transmissible. They can not inherit from any category except Object. Static categories cannot contain associate instance constructor. but, they will have a static builder.
  • Destructor – Destructor is a member function which destructs or deletes an object.

Categorized in:

Programming

Tagged in:

, , , , , , , , , , , , , , , , , , , , , ,

Share Article:

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock