A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

71. If all the members of all the base classes are private then,
a. There won’t be any use of multiple inheritance
b. It will make those members public
c. Derived class can still access them in multiple inheritance
d. Compile time error
View Answer Report Discuss Too Difficult!
Answer: (a).There won’t be any use of multiple inheritance

72. Is it compulsory to have constructor for all the classes involved in multiple inheritance?
a. Yes, always
b. Yes, only if no abstract class is involved
c. No, only classes being used should have a constructor
d. No, they must not contain constructors
View Answer Report Discuss Too Difficult!
Answer: (b).Yes, only if no abstract class is involved

73. If a class contains 2 nested class and is being inherited by another class, will there be any multiple inheritance?
a. No, only single level inheritance is used
b. No, only multilevel inheritance is used
c. Yes, because 3 classes are involved
d. Yes, because more than 1 classes are being derived
View Answer Report Discuss Too Difficult!
Answer: (a).No, only single level inheritance is used

74. Which members can’t be accessed in derived class in multiple inheritance ?
a. Private members of base
b. Public members of base
c. Protected members of base
d. All the members of base
View Answer Report Discuss Too Difficult!
Answer: (a).Private members of base

75. Can the derived class be made abstract if multiple inheritance is used ?
a. No, because other classes must be abstract too
b. Yes, if all the functions are implemented
c. Yes, if all the methods are predefined
d. No, since constructors won’t be there
View Answer Report Discuss Too Difficult!
Answer: (d).No, since constructors won’t be there

76. Which among the following is best to define hierarchical inheritance?
a. More than one classes being derived from one class
b. More than 2 classes being derived from single base class
c. At most 2 classes being derived from single base class
d. At most 1 class derived from another class
View Answer Report Discuss Too Difficult!
Answer: (a).More than one classes being derived from one class

77. Do members of base class gets divided among all of its child classes ?
a. Yes, equally
b. Yes, depending on type of inheritance
c. No, it’s doesn’t get divided
d. No, it may or may not get divided
View Answer Report Discuss Too Difficult!
Answer: (c).No, it’s doesn’t get divided

78. Each class can inherit the base class ________________
a. Independently using any inheritance
b. Independently with private inheritance only
c. With same type of inheritance
d. With each class using different inheritance only
View Answer Report Discuss Too Difficult!
Answer: (a).Independently using any inheritance

79. How many classes must be there to implement hierarchical inheritance ?
a. Exactly 3
b. At least 3
c. At most 3
d. At least 1
View Answer Report Discuss Too Difficult!
Answer: (b).At least 3

80. Base class _______________
a. Can be made abstract
b. Can’t be made abstract
c. Must be abstract
d. If made abstract, compile time error
View Answer Report Discuss Too Difficult!
Answer: (a).Can be made abstract