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 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 # 2
Operator overloading can be performed through__________________.
Choose an answer
Classes
Function
Operators
Reference
Previous
Skip
Next
Question # 3
When an object of a class is defined inside an other class then
Choose an answer
Constructor of enclosing class will be called first
Constructor of inner object will be called first
Constructor and Destructor will be called simultaneously
None of the given options
Previous
Skip
Next
Question # 4
*.doc is _____________ by type.
Choose an answer
Sequential File
Random Access File
Data File
Record File
Previous
Skip
Next
Question # 5
Friend functions are _____ of a class
Choose an answer
Member functions
Public member functions
Private member functions
Non-member functions
Previous
Skip
Next
Question # 6
Consider the following code segment. What will be the output of following code? Int addValue (int *a){ int b = (*a) + 2; return b ; } main () { int x =6 ; cout << x << “,” ; cout << addValue(&x) << “,” ; cout << x ; }.
Choose an answer
6,8,6
6,6,8
6,8,8
6,6,6
Previous
Skip
Next
Question # 7
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 # 8
A pointer variable can be,
Choose an answer
Decremented
Incremented
Multiplied
Both Iecremented and Decremented
Previous
Skip
Next
Question # 9
All A template function must have at least ---------- generic data type.
Choose an answer
Zero
One
Two
Three
Previous
Skip
Next
Question # 10
Which of the following function call is correct for the function prototype? defaultParameters ( int a, int b = 7, char z = ‘*’ );
Choose an answer
defaultParameters (5);
defaultParameters (5, ‘8’);
defaultParameters (6, ‘#’);
defaultParameters (0, 0, ‘*’, 0);
Previous
Skip
Next
Question # 11
When ever dynamic memory allocation is made in C/C++, it is freed_____________.
Choose an answer
Explicitly
Implicitly
Both explicitly and implicitly
None of the given options
Previous
Skip
Next
Question # 12
Overloaded delete operator function takes parameter of void pointer and returns.
Choose an answer
void
void pointer
pointer to an object
pointer of type int
Previous
Skip
Next
Question # 13
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 # 14
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 # 15
Disks are _______________ devices having access time of _________ milliseconds
Choose an answer
Electro-physical, 6
Electro-Mechanical, 4
Electro-physical, 5
Electro-Mechanical, 7
Previous
Skip
Next
Question # 16
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 # 17
Which of the following is the correct C++ syntax to allocate space dynamically for an array of 10 int?
Choose an answer
new int(10)
new int[10] ;
int new(10) ;
int new[10];
Previous
Skip
Next
Question # 18
The first parameter of overloaded stream insertion operator is _________ where second parameter is _______ .
Choose an answer
input stream, object of class
object of class, output stream
output stream, object of class
object of class, input stream
Previous
Skip
Next
Question # 19
Class is a user defined___________.
Choose an answer
Data type
Memory referee
Value
None of the given options
Previous
Skip
Next
Question # 20
When an object of a class is defined inside another class then,
Choose an answer
Destructor of enclosing class will be called first
Destructor of inner object will be called first
Constructor and Destructor will be called simultaneously
None of the given options
Previous
Skip
Next
Back