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
When an operator function is defined as member function for a binary Plus (+) operator then the number of argument it take is/are
Choose an answer
Zero
One
Two
N arguments
Previous
Skip
Next
Question # 2
The prototype of friend functions must be written ____ the class and its definition must be written ____.
Choose an answer
inside, inside the class
inside, outside the class
outside, inside the class
outside, outside the class
Previous
Skip
Next
Question # 3
When an object of a class is defined inside another class then,
Choose an answer
Destructor of enclosing class will be called first
Destructor of inner object will be called first
Constructor and Destructor will be called simultaneously
None of the given options
Previous
Skip
Next
Question # 4
Which of the following is the correct C++ syntax to allocate space dynamically for an array of 10 int?
Choose an answer
new int(10)
new int[10] ;
int new(10) ;
int new[10];
Previous
Skip
Next
Question # 5
What does STL stand for?
Choose an answer
Source template library
Standard template library
Stream template library
Standard temporary library
Previous
Skip
Next
Question # 6
The code is written to __________ the program.
Choose an answer
implement
design
analysis
none of the given options
Previous
Skip
Next
Question # 7
Disks are _______________ devices having access time of _________ milliseconds
Choose an answer
Electro-physical, 6
Electro-Mechanical, 4
Electro-physical, 5
Electro-Mechanical, 7
Previous
Skip
Next
Question # 8
If there is a symbol (& sign) used with the variable name followed by data type then it refers to _____ and if & is being used with variable name then it refers to _____.
Choose an answer
Address of variable, reference variable
Reference variable, value of variable
Reference variable, address of variable
Address of variable, value of variable
Previous
Skip
Next
Question # 9
&& is -------------------- operator.
Choose an answer
An arithmetic
Logical
Relational
Unary
Previous
Skip
Next
Question # 10
Which of the following statement is best regarding declaration of friend function?
Choose an answer
Friend function must be declared after public keyword
Friend function must be declared after private keyword
Friend function must be declared at the top within class definition
It can be declared anywhere in class as these are not affected by the public and private keywords
Previous
Skip
Next
Question # 11
Which of the following is NOT a preprocessor directive?
Choose an answer
#error
#define
#line
#ndefine
Previous
Skip
Next
Back