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
Assignment operator is -------------------------associative.
Choose an answer
right
left
binary
unary
Previous
Skip
Next
Question # 2
For which values of the integer _value will the following code becomes an infinite loop? int number=1; while (true) { cout << number; if (number == 3) break; number += integer_value; }.
Choose an answer
any number other than 1 or 2
only 0
only 1
only 2
Previous
Skip
Next
Question # 3
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 # 4
Which of the following function is used to increase the size of already allocated memory chunk?
Choose an answer
malloc
calloc
realloc
free
Previous
Skip
Next
Question # 5
New and Delete are also used with ___________ and data types as well.
Choose an answer
Class, Objects
Structures, Pointers
Both Class and structures
None of above
Previous
Skip
Next
Question # 6
Header file: fstream.h includes the definition of the stream classes __________.
Choose an answer
ifstream, fstream, cout
ifstream, fstream, ofstream
fstream, cin, cout
None of the above
Previous
Skip
Next
Question # 7
Structured Query Language is used for ______________
Choose an answer
Databases Management
Networks
Writing Operating System
none of the given options
Previous
Skip
Next
Question # 8
What purpose do classes serve?
Choose an answer
Data encapsulation
Providing a convenient way of modeling real-world objects
Simplifying code reuse
All of the given options
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 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
Question # 11
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