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
A range is often supplied to an algorithm by two _______ values.
Choose an answer
italic
iteration
iterator
None of given
Previous
Skip
Next
Question # 2
Default constructor is such constructor which either has no ---------or if it has some parameters these have ----- --- values
Choose an answer
Parameter, temporary
Null, Parameter
Parameter, default
None of the given
Previous
Skip
Next
Question # 3
Like template functions, a class template may not handle all the types successfully.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 4
this pointers are not accessible for static member functions.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 5
Associativity can be changed in operator overloading.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 6
Suppose that the Test class does not have an overloaded assignment operator. What happens when an assignment a=b; is given for two Test objects a and b?
Choose an answer
The automatic assignment operator is used
The copy constructor is used
Compiler error
Run-time error
Previous
Skip
Next
Question # 7
When a variable is define as static in a class then all object of this class,
Choose an answer
Have different copies of this variable
Have same copy of this variable
Can not access this variable
None of given
Previous
Skip
Next
Question # 8
template <> class Vector
{ } This is an example of partial specialization.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 9
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 # 10
Suppose you create an uninitialized vector as follows: vector
evec; After adding the statment, evec.push_back(21); what will happen?
Choose an answer
The following statement will add an element to the start (the back) of evec and will initialize it with the value 21.
The following statement will add an element to the center of evec and will reinitialize it with the value 21.
The following statement will delete an element to the end (the back) of evec and will reinitialize it with the value 21
The following statement will add an element to the end (the back) of evec and initialize it with the value 21.
Previous
Skip
Next
Question # 11
Algorithms can only be implemented using STL containers.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Back