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 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 # 2
A Pointer is a special variable that contain.
Choose an answer
Data values
Memory Address
Both data and values
None of the given option
Previous
Skip
Next
Question # 3
"new" and "delete" keywords are _____________ in C++ language
Choose an answer
Built-in- Function
Operators
Memory Allocation Function
None of the given options
Previous
Skip
Next
Question # 4
A pointer variable can be,
Choose an answer
Decremented
Incremented
Multiplied
Both Iecremented and Decremented
Previous
Skip
Next
Question # 5
Array is a data structure which store
Choose an answer
Memory addresses
Variables
Data Type
Data
Previous
Skip
Next
Question # 6
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 # 7
Consider the following code segment. What will be the output of following code? Int addValue (int *a){ int b = (*a) + 2; return b ; } main () { int x =6 ; cout << x << “,” ; cout << addValue(&x) << “,” ; cout << x ; }.
Choose an answer
6,8,6
6,6,8
6,8,8
6,6,6
Previous
Skip
Next
Question # 8
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 # 9
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 # 10
The return type of a function that do not return any value must be ________.
Choose an answer
float
int
void
double
Previous
Skip
Next
Question # 11
The programs, in which we allocate static memory, run essentially on ________
Choose an answer
Heap
System Cache
None of the given options
Stack
Previous
Skip
Next
Back