More Classes
5th Class
6th Class
7th Class
8th Class
9th Class
10th Class
11th Class
12th Class
NAT I
NAT II
CSS
IQ
General Knowledge
MDCAT
ECAT
GAT General
GAT Subject
Other Links
Go to Home
Online Tests
CS-304 Final Term Exams Preparation Virtual University MCQs With Answers
Question # 1
In case of multiple inheritance a derived class inherits,
Choose an answer
Only the public member functions of its base classes
Only the public data members of its base classes
Both public data members and member functions of all its base classes
Data members and member functions of any two base classes
Previous
Skip
Next
Question # 2
Classes like TwoDimensionalShape and ThreeDimensionalShape would normally be concrete, while classes like Sphere and Cube would normally be abstract.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 3
A member function having the same name as that of a class and a ~ sign with it is called,
Choose an answer
Constructor
Getter
Setter
Destructor
Previous
Skip
Next
Question # 4
We can use "this" pointer in the constructor in the body and even in the initialization list of any class if we are careful
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 5
Consider the following statement Cupboard has books What is the relationship between Cupboard and books?
Choose an answer
Composition
Aggregation
Inheritance
None of the given options
Previous
Skip
Next
Question # 6
Which of the following are an advantage of OOP?
Choose an answer
OOP makes it easy to re-use the code
It provides an ability to create one user defined data type by extending the other
It provides the facility of defining Abstract data types through which real world entities can be defined better
All of the given options
Previous
Skip
Next
Question # 7
A template argument is preceded by the keyword ________.
Choose an answer
vector
class
template
type*
Previous
Skip
Next
Question # 8
Static variable can be initialized more than once.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 9
this pointer does not point to current object of any class,
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 10
In case of multiple inheritance a derived class inherits,
Choose an answer
Only the public member functions of its base classes
Only the public data members of its base classes
Both public data members and member functions of all its base classes
Data members and member functions of any two base classes
Previous
Skip
Next
Question # 11
A copy constructor is invoked when
Choose an answer
a function do not returns by value
an argument is passed by value
a function returns by reference.
an argument is passed by reference.
Previous
Skip
Next
Back