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
"setprecision" manipulator will set.
Choose an answer
The number of digits after the decimal point.
The number of digits before the decimal point
The number of digits in a number
None of the given options
Previous
Skip
Next
Question # 2
Friend function of a class is ______________.
Choose an answer
Member function
Non-member function
Private function
Public function
Previous
Skip
Next
Question # 3
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 # 4
What does STL stand for?
Choose an answer
Source template library
Standard template library
Stream template library
Standard temporary library
Previous
Skip
Next
Question # 5
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 # 6
Which of the following statement is best regarding declaration of friend function?
Choose an answer
Friend function must be declared after public keyword
Friend function must be declared after private keyword
Friend function must be declared at the top within class definition
It can be declared anywhere in class as these are not affected by the public and private keywords
Previous
Skip
Next
Question # 7
If text is a pointer of class String then what is meant by the following statement? text = new String [5];
Choose an answer
Creates an array of 5 string objects statically
creates an array of 5 string objects dynamically
Creates an array of pointers to string
Creates a string Object
Previous
Skip
Next
Question # 8
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 # 9
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
Question # 10
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 # 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
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 # 13
Consider the following code segment. What will be the output of the following program? int func(int) ; int num = 10 ; int main(){ int num ; num = 5 ; cout << num ; cout << func(num) ; } int func(int x){ return num ; }
Choose an answer
5, 5
10, 5
5, 10
10, 10
Previous
Skip
Next
Question # 14
A template function must have
Choose an answer
One or more than one arguments
Only one argument
Zero arguments
None of the given options
Previous
Skip
Next
Question # 15
What will be the correct syntax to declare two-dimensional array of float data type?
Choose an answer
float arr{2}{2} ;
float arr[2][2] ;
float arr[2,2] ;
float[2][2] arr ;
Previous
Skip
Next
Question # 16
The normal source of cin object is
Choose an answer
File
Disk
Keyboard
RAM
Previous
Skip
Next
Question # 17
The operator used for casting, in C, is standard ________ operator.
Choose an answer
none of the given options
cast
cost
const
Previous
Skip
Next
Question # 18
NULL value has been defined in ______ and _________ header files.
Choose an answer
strings.h and iostream.h
ctype.h and conio.c
conio.c and conio.h
stdlib.h and stddef.h
Previous
Skip
Next
Question # 19
Array is a data structure which store
Choose an answer
Memory addresses
Variables
Data Type
Data
Previous
Skip
Next
Question # 20
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
Question # 21
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
Back