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
Static variables act like a global variable in the context or scope of the class.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 2
Vectors contain contiguous elements stored as a[an] ___.
Choose an answer
variable
array
function
datatype
Previous
Skip
Next
Question # 3
Algorithms can only be implemented using STL containers.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 4
Which construct is the source for the creation of an object?
Choose an answer
Destructor of the class
New operator
Delete operator
Constructor of the class
Previous
Skip
Next
Question # 5
Which of the following operator(s) take(s) one or no argument if overloaded?
Choose an answer
++
-
+
All of the above
Previous
Skip
Next
Question # 6
One purpose of an iterator in the STL is to connect algorithms and containers.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 7
In order to free the memory occupied by the object, we use -------------
Choose an answer
Constructor
Destructor
Shallow Copy
Deep Copy
Previous
Skip
Next
Question # 8
When we write a class template the first line must be:
Choose an answer
template < class class_name>
template < class data_type>
templete< class T >
Here T can be replaced with any name but it is preferable
class class-name() class template
Previous
Skip
Next
Question # 9
Function templates should be used where code and behavior must be identical.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 10
What is true about function templates?
Choose an answer
The compiler generates only one copy of the function template
The compiler generates a copy of function respective to each type of data
The compiler can only generate copy for the int type data
non of the given
Previous
Skip
Next
Question # 11
_______ remain in memory even when all objects of a class have been destroyed.
Choose an answer
Static variables
Instance variable
Primitive variables
None of given
Previous
Skip
Next
Back