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-201 Final Term Exams Preparation Virtual University MCQs With Answers
Question # 1
Which value is returned by the destructor of a class?
Choose an answer
A pointer to the class
An object of the class
A status code determining whether the class was destructed correctly
Destructors do not return a value.
Previous
Skip
Next
Question # 2
With user-defined data type variables (Objects), self assignment can produce.
Choose an answer
Syntax error
Logical error
Link error
Non of the given options
Previous
Skip
Next
Question # 3
The first parameter of overloaded stream insertion operator is _________ where second parameter is _______ .
Choose an answer
input stream, object of class
object of class, output stream
output stream, object of class
object of class, input stream
Previous
Skip
Next
Question # 4
What is the sequence of event(s) when deallocating memory using delete operator?
Choose an answer
Only block of memory is deallocated for objects
Only destructor is called for objects
Memory is deallocated first before calling destructor
Destructor is called first before deallocating memory
Previous
Skip
Next
Question # 5
While calling function, the arguments are assigned to the parameters from _____________.
Choose an answer
left to right
right to left
no specific order is followed
none of the given options
Previous
Skip
Next
Question # 6
The operator used for casting, in C, is standard ________ operator.
Choose an answer
none of the given options
cast
cost
const
Previous
Skip
Next
Question # 7
A template function must have
Choose an answer
One or more than one arguments
Only one argument
Zero arguments
None of the given options
Previous
Skip
Next
Question # 8
The default value of a parameter can be provided inside the ________________
Choose an answer
function prototype
function definition
both function prototype or function definition
none of the given options
Previous
Skip
Next
Question # 9
To access the data members of structure _______ is used.
Choose an answer
dot operator
* operator
U operator
None of given
Previous
Skip
Next
Question # 10
The object _______________may be used both for file input and file output.
Choose an answer
fstream
ifstream
ofstream
none of the given options
Previous
Skip
Next
Question # 11
A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this
Choose an answer
Write a separate class to handle each
Use templates
Use strings to store all types
None of the given options
Previous
Skip
Next
Back