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 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 # 2
_______ 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 # 3
Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?
Choose an answer
Class-name operator +()
Class-name operator +(int)
Class-name operator ++() ;
Class-name operator ++(int) ;
Previous
Skip
Next
Question # 4
Which character is inserted at the end of string to indicate the end of string?
Choose an answer
new line
tab
null
carriage return
Previous
Skip
Next
Question # 5
Assignment operator is -------------------------associative.
Choose an answer
right
left
binary
unary
Previous
Skip
Next
Question # 6
Which of the following is correct way to initialize a variable x of int type with value 10?
Choose an answer
int x ; x = 10;
int x = 10;
int x, x = 10;
x = 10;
Previous
Skip
Next
Question # 7
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 # 8
The function free() returns back the allocated memory got thorough calloc andmalloc to _____.
Choose an answer
stack
heap
stack and heap
None of the given options
Previous
Skip
Next
Question # 9
What is the sequence of event(s) when allocating memory using new operator?
Choose an answer
Only block of memory is allocated for objects
Only constructor is called for objects
Memory is allocated first before calling constructor
Constructor is called first before allocating memory
Previous
Skip
Next
Question # 10
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
Back