Professional Documents
Culture Documents
3. Which type of inheritance allows a class to inherit from multiple base classes?
a) Single inheritance
b) Multiple inheritance
c) Hierarchical inheritance
d) Multilevel inheritance
4. What is the primary difference between a class template and a function template in C++?
a) const
b) static
c) final
d) readonly
a) final
b) sealed
c) const
d) static
a) template
b) generic
c) class
d) typedef
a) Inheritance
b) Encapsulation
c) Polymorphism
d) Abstraction
c) Ability to define multiple functions with the same name but different arguments
c) To perform calculations
a) class MyClass() {}
b) MyClass() {}
c) constructor MyClass() {}
d) void constructor() {}
a) A function
b) A data type
c) A loop
d) A variable
d) Functions must have the same number of arguments but different types
a) .
b) ::
c) ->
d) :
a) inherit
b) extends
c) inherits
d) :
18. Which access specifier allows members to be accessible only within the same class and its
derived classes?
a) public
b) private
c) protected
d) global
a) class
b) define
c) struct
d) object
a) static
b) public
c) private
d) protected
b) Different classes
a) To initialize an object
c) To copy an object
a) Single inheritance
b) Multiple inheritance
c) Hierarchical inheritance
d) Circular inheritance
a) Inheritance
b) Encapsulation
c) Polymorphism
d) Abstraction
c) Ability to define multiple functions with the same name but different arguments
a) .
b) ::
c) ->
d) :
33. Which of the following is true about static member functions in C++?
a) Compile-time polymorphism
b) Run-time polymorphism
c) Operator overloading
d) Encapsulation
a) .
b) ::
c) ->
b) extends
c) inherits
d) :
b) To initialize an object
c) To delete an object
d) To move an object
Createaccount()
Deposit()
Withdraw()
Calculateinterest()
Checkbalance()
10. List and explain the features and advantages of Object-oriented Programming language