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 appropriate data type to store the number of rows and colums of the matrix is____________.
Choose an answer
float
int (Not sure)
char
none of the given options
Previous
Skip
Next
Question # 2
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 # 3
How many bytes will the pointer intPtr of type int move in the following statement? intPtr += 3 ;
Choose an answer
3 bytes
6 bytes
12 bytes
24 bytes
Previous
Skip
Next
Question # 4
Like member functions, ______ can also access the private data members of a class.
Choose an answer
Non-member functions
Friend functions
Any function outside class
None of the given options
Previous
Skip
Next
Question # 5
When we use manipulators in our program then which header file should be included?
Choose an answer
iostream.h
stdlib.h
stdio.h
iomanip.h
Previous
Skip
Next
Question # 6
_______ 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 # 7
Which of the following function do NOT initialize the chunk of memory to all zero?
Choose an answer
calloc() function
Both malloc() and calloc()
None of the above
malloc() function
Previous
Skip
Next
Question # 8
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 # 9
Which kind of functions can access private member variables of a class?
Choose an answer
Friend functions of the class
Private member functions of the class
Public member functions of the class
Friend, private and public functions
Previous
Skip
Next
Question # 10
Skill(s) that is/are needed by programmer’s _______________________.
Choose an answer
Paying attention to detail
Think about the reusability
Think about user interface
All of the given options
Previous
Skip
Next
Question # 11
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
Back