| |
GeekInterview.com > Interview Questions > Programming > C++
| Print | |
Question: Inheritance
Answer: Which one of the following statements regarding C++ class inheritance is FALSE?
a. Inheritance promotes generic design and code reuse. b. Struct cannot be inherited in C++.
c. C++ supports multiple inheritance. d. Inheritance is a mechanism through which a subclass inherits the properties and behavior of its superclass.
|
| June 06, 2009 08:08:17 |
#3 |
| gunjan.chandra |
Member Since: April 2009 Total Comments: 7 |
RE: Inheritance |
B. Structures cannot be inherited in C++ is False There are some major difference between Class and Structures in C++. 1. Class members are private by default but in Stuctures they are Public. 2. In case of Structures we cannot initialize variables during declaration while in Class we can. 3. Structures does not support polymorphism while Classes do. |
| |
Back To Question | |