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
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 # 2
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 # 3
Every class contains _______________.
Choose an answer
Constructor
Destructor
Both a constructor and a destructor
None of the given options
Previous
Skip
Next
Question # 4
When an operator function is defined as member function for a binary Plus (+) operator then the number of argument it take is/are.
Choose an answer
Zero
One
Two
N arguments
Previous
Skip
Next
Question # 5
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 # 6
*.doc is _____________ by type.
Choose an answer
Sequential File
Random Access File
Data File
Record File
Previous
Skip
Next
Question # 7
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 # 8
Which of the following is used with bit manipulation?
Choose an answer
Signed integer
Un-signed integer
Signed double
Un-signed double
Previous
Skip
Next
Question # 9
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 # 10
Which of the following option will be true, if we overload "-=" operator?
Choose an answer
only - operator needs to be overloaded
Minus (-) and = operators need to be overloaded
the -= operator need to be overloaded explicitly
the - and = operators need to be overloaded implicitly
Previous
Skip
Next
Question # 11
To access the data members of structure _______ is used.
Choose an answer
dot operator
* operator
U operator
None of given
Previous
Skip
Next
Question # 12
Friend function of a class is ______________.
Choose an answer
Member function
Non-member function
Private function
Public function
Previous
Skip
Next
Question # 13
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 # 14
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 # 15
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 # 16
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 # 17
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 # 18
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 # 19
Skill(s) that is/are needed by programmer’s _______________________.
Choose an answer
Paying attention to detail
Think about the reusability
Think about user interface
All of the given options
Previous
Skip
Next
Question # 20
Header file: fstream.h includes the definition of the stream classes __________.
Choose an answer
ifstream, fstream, cout
ifstream, fstream, ofstream
fstream, cin, cout
None of the above
Previous
Skip
Next
Question # 21
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
Back