CS304 - MCQS Object Oriented Programming
CS304 - MCQS Object Oriented Programming
Solved-MCQs
Shared & Solved by Umair Saulat
Derived class can inherit from public base class as well as private and protected
base classes
True
False
Which line will produce error. Class phone: Private Transmit, private Receiver { }
1.int main () 2. { 3.phone obj; 4.Tranmit*obj1 = &obj; 5.Received obj2 = &obj; 6.}
3 line will produce error
rd
A class D can be derived from a class C, which is derived froma class B, which is
derived from a class A
True
False
Adding a derived class to a base class requires fundamental changes to the base
class.
True
False
A Class or class template can have member ___________ that are themselves
templates.
Variable
Function
Objects
None of given
Sender of the message does not need to know the exact class of receiver
in________.
Abstraction
Polymorphism
Inheritance
none of the given