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
The sub-object’s life is not dependant on the life of master class in __________.
Choose an answer
Separation
Composition
Aggregation
Previous
Skip
Next
Question # 2
Encapsulation means
Choose an answer
Extending the behaviour of class in another class
Data and behaviour are tightly coupled within an entity
One entity takes all the attributes and operations of the other
Taking out the common features and put those in a separate class
Previous
Skip
Next
Question # 3
The concept of derived classes is involved in,
Choose an answer
inheritance
encapsulation
array
structure
Previous
Skip
Next
Question # 4
Assume a class Derv that is privately derived from class Base. An object of class Derv located in main() can access
Choose an answer
public members of Derv.
protected members of Derv.
private members of Derv
protected members of Base.
Previous
Skip
Next
Question # 5
A function call is resolved at run-time in___________
Choose an answer
non-virtual member function.
virtual member function.
Both non-virtual member and virtual member function.
None of given
Previous
Skip
Next
Question # 6
The >= operator can be overloaded.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 7
Which operator can not be overloaded?
Choose an answer
The relation operator ( >= )
Assignment operator ( = )
Script operator ( [] )
Conditional operator (? : )
Previous
Skip
Next
Question # 8
An STL container can not be used to
Choose an answer
hold objects of class employee.
store elements in a way that makes them quickly accessible
compile c++ programs.
organize the way objects are stored in memory
Previous
Skip
Next
Question # 9
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 # 10
Non Template Friend functions of a class are friends of ________instance/s of that class.
Choose an answer
All
One specific
All instances of one date type
None of the given options
Previous
Skip
Next
Question # 11
Given the following class class Base{ int Age=33; } How you can improve above class with respect to accessing the field Age?
Choose an answer
Define the variable Age as private
Define the variable Age as protected
Define the variable Age as private and create a get method that returns it and a set method that updates it
Define the variable Age as protected and create a set method that returns it and a get method that updates it
Previous
Skip
Next
Back