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
Friend function of a class is ______________.
Choose an answer
Member function
Non-member function
Private function
Public function
Previous
Skip
Next
Question # 2
Array is a data structure which store
Choose an answer
Memory addresses
Variables
Data Type
Data
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
C is widely known as development language of _______ operating system.
Choose an answer
Linux
Windows
Unix
Mac OS
Previous
Skip
Next
Question # 5
New operator allocates memory from free store and return.
Choose an answer
A pointer
A reference
An integer
A float
Previous
Skip
Next
Question # 6
The first parameter of operator function for << operator,
Choose an answer
Must be passed by value
Must be passed by reference
Can be passed by value or reference
Must be object of class
Previous
Skip
Next
Question # 7
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 # 8
width() is member function of _____________.
Choose an answer
cin object
cout object
Both cin and cout object
None of the given option
Previous
Skip
Next
Question # 9
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 # 10
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 # 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