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
Which of these are examples of error handling techniques?
Choose an answer
Abnormal Termination
Graceful Termination
Return the illegal
all of the given
Previous
Skip
Next
Question # 2
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 # 3
Friend class and friend function can be used as an alternate to each other
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 4
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
None of the given.
Previous
Skip
Next
Question # 5
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 # 6
Non Template Friend functions of a class are friends of ________instance/s of
Choose an answer
All
One specific
All instances of one date type
None of the given options
Previous
Skip
Next
Question # 7
What a derived class can add?
Choose an answer
New data members
New member functions and New friend function
New constructors and destructor
All of given
Previous
Skip
Next
Question # 8
Which one is not keyword in C++?
Choose an answer
operator
B_op
const
None of given
Previous
Skip
Next
Question # 9
Algorithms can only be implemented using STL containers.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 10
----------------- follow try block to catch the object thrown
Choose an answer
catch block
throw block
main block
non of the given
Previous
Skip
Next
Question # 11
Suppose obj1 and obj2 are two objects of a user defined class A. An + operator is overloaded to add obj1 and obj2 using the function call obj1+obj2. Identify the correct function prototype against the given call?
Choose an answer
A operator + ( A &obj);
int + operator();
int operator (plus) ();
A operator(A &obj3);
Previous
Skip
Next
Back