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
MGT-301 Final Term Exams Preparation Virtual University MCQs With Answers
Question # 1
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 # 2
The object _______________may be used both for file input and file output.
Choose an answer
fstream
ifstream
ofstream
none of the given options
Previous
Skip
Next
Question # 3
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 # 4
If overloaded plus operator is implemented as non-member function then which of the following statement will be true for the statement given below?obj3 = obj1 + obj2 ;
Choose an answer
obj2 will be passed as an argument to + operator whereas obj2 willdrive the + operator
obj1 will drive the + operator whereas obj2 will be passed as an argument to + operator
Both objects (obj1, obj2) will be passed as arguments to the + operator (not sure)
Any of the objects (obj1, obj2) can drive the + operator
Previous
Skip
Next
Question # 5
Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?
Choose an answer
Class-name operator +()
Class-name operator +(int)
Class-name operator ++() ;
Class-name operator ++(int) ;
Previous
Skip
Next
Question # 6
While calling function, the arguments are assigned to the parameters from _____________.
Choose an answer
left to right
right to left
no specific order is followed
none of the given options
Previous
Skip
Next
Question # 7
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 # 8
Array is a data structure which store
Choose an answer
Memory addresses
Variables
Data Type
Data
Previous
Skip
Next
Question # 9
For cin, the source is normally a ________ and destination can be.
Choose an answer
File,native data type
Disk, user-define type
Keyboard, variable
File, user-define type
Previous
Skip
Next
Question # 10
Friend functions are _____ of a class
Choose an answer
Member functions
Public member functions
Private member functions
Non-member functions
Previous
Skip
Next
Question # 11
The normal source of cin object is
Choose an answer
File
Disk
Keyboard
RAM
Previous
Skip
Next
Question # 12
_______ 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 # 13
Which of the following is NOT a preprocessor directive?
Choose an answer
#error
#define
#line
#ndefine
Previous
Skip
Next
Question # 14
The stream objects cin and cout are included in which header file?
Choose an answer
iostream.h
fstream.h
istream.h
ostream.h
Previous
Skip
Next
Question # 15
Which of the following function calling mechanism is true for the function prototype given below?
Choose an answer
Call by value
Call by reference using pointer
Call by reference using reference variable
None of the given options
Previous
Skip
Next
Question # 16
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 # 17
Pointer is a variable which store
Choose an answer
Data
Memory Address
Data Type
Values
Previous
Skip
Next
Question # 18
When an array is passed to a function then default way of passing this array is
Choose an answer
By data
By reference
By value
By data type
Previous
Skip
Next
Question # 19
Unary operator implemented as member function takes ____ arguments whereas non-member function takes _____ arguments.
Choose an answer
One, zero
Zero, one
One, two
Two, one
Previous
Skip
Next
Question # 20
New operator is used to allocate memory from the free store during
Choose an answer
Compile Time
Run Time
Link Time
None of the given options
Previous
Skip
Next
Back