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
The normal source of cin object is
Choose an answer
File
Disk
Keyboard
RAM
Previous
Skip
Next
Question # 2
If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block?
Choose an answer
parentheses ( )
braces { }
brackets [ ]
arrows < >
Previous
Skip
Next
Question # 3
UNIX has been developed in ________ language
Choose an answer
JAVA
B
C
FORTRAN
Previous
Skip
Next
Question # 4
What does STL stand for?
Choose an answer
Source template library
Standard template library
Stream template library
Standard temporary library
Previous
Skip
Next
Question # 5
In if structure the block of statements is executed only.
Choose an answer
When the condition is false
When it contain arithmetic operators
When it contain logical operators
When the condition is true
Previous
Skip
Next
Question # 6
What does (*this) represents?
Choose an answer
The current function of the class
The current pointer of the class
The current object of the class
A value of the data member
Previous
Skip
Next
Question # 7
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 # 8
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 # 9
What will be the value of ‘a’ and ‘b’ after executing the following statements?A = 3; b = a++;
Choose an answer
3, 4
4, 4
3, 3
4, 3
Previous
Skip
Next
Question # 10
Every class contains _______________.
Choose an answer
Constructor
Destructor
Both a constructor and a destructor
None of the given options
Previous
Skip
Next
Question # 11
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 # 12
If it is required to copy an array to another array then.
Choose an answer
Both arrays must be of the same size and data type
Both arrays may be of different size
Both arrays may be of different data type
Both arrays may be of different size and type
Previous
Skip
Next
Question # 13
Reference Value Type Data The code is written to __________ the program.
Choose an answer
implement
design
analysis
none of the given options
Previous
Skip
Next
Question # 14
C is widely known as development language of _______ operating system.
Choose an answer
Linux
Windows
Unix
Mac OS
Previous
Skip
Next
Question # 15
The return type of the operator function for << operator is __________.
Choose an answer
class for which we overload operator
reference of ostream class (ostream&)
reference of istream class (istream&)
void
Previous
Skip
Next
Question # 16
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 # 17
_______ is used to trace the logic of the program and correct the logical errors.
Choose an answer
Compiler
Editor
Linker
Debugger
Previous
Skip
Next
Question # 18
What will be the correct syntax to assign an array named arr of 5 elements to a pointer ptr?
Choose an answer
*ptr = arr ;
ptr = arr ;
*ptr = arr[5] ;
ptr = arr[5] ;
Previous
Skip
Next
Back