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 we define an array of objects then
Choose an answer
Destructor will call once for whole array
Destructor will call for each object of the array
Destructor will never call
Depends on the size of array
Previous
Skip
Next
Question # 2
When a value is referred by a normal variable then it is known as,
Choose an answer
Direct Reference
Indirect Reference
Partial Reference
Proper Reference
Previous
Skip
Next
Question # 3
Which of the following function calling mechanism is true for the function prototype given below?
Choose an answer
Call by value
Call by reference using pointer
Call by reference using reference variable
None of the given options
Previous
Skip
Next
Question # 4
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 # 5
Which of the following is NOT a preprocessor directive?
Choose an answer
#error
#define
#line
#ndefine
Previous
Skip
Next
Question # 6
Friend functions are _____ of a class
Choose an answer
Member functions
Public member functions
Private member functions
Non-member functions
Previous
Skip
Next
Question # 7
Friend function of a class is ______________.
Choose an answer
Member function
Non-member function
Private function
Public function
Previous
Skip
Next
Question # 8
In C/C++ if we define an array of size eight (8) i.e. int Arr [8]; then the last element of this array will be stored at
Choose an answer
Arr[0]
Arr[8]
Arr[7]
Arr[-1]
Previous
Skip
Next
Question # 9
Friend function of a class is ______________
Choose an answer
Member function
Non-member function
Private function
Public function
Previous
Skip
Next
Question # 10
If text is a pointer of class String then what is meant by the following statement? text = new String [5];
Choose an answer
Creates an array of 5 string objects statically
creates an array of 5 string objects dynamically
Creates an array of pointers to string
Creates a string Object
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
Back