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.

51. Multilevel inheritance allows _________________ in the program.
a. Only 7 levels of inheritance
b. At least 7 levels of inheritance
c. At most 16 levels of inheritance
d. As many levels of inheritance as required
View Answer Report Discuss Too Difficult!
Answer: (d).As many levels of inheritance as required

52. What is minimum number of levels for a implementing multilevel inheritance?
a. 1
b. 2
c. 3
d. 4
View Answer Report Discuss Too Difficult!
Answer: (c).3

53. In multilevel inheritance one class inherits _______________
a. Only one class
b. More than one class
c. At least one class
d. As many classes as required
View Answer Report Discuss Too Difficult!
Answer: (a).Only one class

54. All the classes must have all the members declared private to implement multilevel inheritance.
a. True
b. False
c. May be
d. Can't say
View Answer Report Discuss Too Difficult!
Answer: (b).False

55. Can abstract classes be used in multilevel inheritance?
a. Yes, always
b. Yes, only one abstract class
c. No, abstract class doesn’t have constructors
d. No, never
View Answer Report Discuss Too Difficult!
Answer: (a).Yes, always

56. How many abstract classes can be used in multilevel inheritance?
a. Only 1
b. Only 2
c. At least one less than number of levels
d. Can’t be used
View Answer Report Discuss Too Difficult!
Answer: (c).At least one less than number of levels

57. If all the classes used parameterized constructors and no default constructor then, ___________
a. The object of lower level classes can’t be created
b. Object of lower level classes must call parent class constructors explicitly
c. Object of lower level classes must define all the default constructors
d. Only object of first class can be created, which is first parent
View Answer Report Discuss Too Difficult!
Answer: (b).Object of lower level classes must call parent class constructors explicitly

58. In multilevel inheritance, which is the most significant feature of OOP used?
a. Code readability
b. Flexibility
c. Code reusability
d. Code efficiency
View Answer Report Discuss Too Difficult!
Answer: (c).Code reusability

59. Does following code show multiple inheritance?
class A
{
 int a;
};
class B
{
 int b;
};
class C:public A, public B
{
 int c;
};
class D:public C
{
 int d;
};
a. Yes, class C and class D
b. Yes, All together it’s multilevel
c. No, 4 classes are used
d. No, multiple inheritance is used with class A, B and C
View Answer Report Discuss Too Difficult!
Answer: (d).No, multiple inheritance is used with class A, B and C

60. Is it compulsory for all the classes in multilevel inheritance to have constructors defined explicitly if only last derived class object is created?
a. Yes, always
b. Yes, to initialize the members
c. No, it not necessary
d. No, Constructor must not be defined
View Answer Report Discuss Too Difficult!
Answer: (c).No, it not necessary

Page 6 of 11