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
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 # 2
&& is -------------------- operator.
Choose an answer
An arithmetic
Logical
Relational
Unary
Previous
Skip
Next
Question # 3
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
Question # 4
Class is a user defined___________.
Choose an answer
Data type
Memory referee
Value
None of the given options
Previous
Skip
Next
Question # 5
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 # 6
What will be the correct syntax to access the value of fourth element of an array using pointer ptr?
Choose an answer
ptr[3]
(ptr+3)
*(ptr+3)
Both 1and 3
Previous
Skip
Next
Question # 7
A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this _______________
Choose an answer
Write a separate class to handle each
Use templates
Use strings to store all types
None of the given options
Previous
Skip
Next
Question # 8
Structured Query Language is used for ______________
Choose an answer
Databases Management
Networks
Writing Operating System
none of the given options
Previous
Skip
Next
Question # 9
The statement cin.get (); is used to,
Choose an answer
Read a string from keyboard
Read a character from keyboard
Read a string from file
Read a character from file
Previous
Skip
Next
Question # 10
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 # 11
C is widely known as development language of _______ operating system.
Choose an answer
Linux
Windows
Unix
Mac OS
Previous
Skip
Next
Back