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 operator used for casting, in C, is standard ________ operator.
Choose an answer
none of the given options
cast
cost
const
Previous
Skip
Next
Question # 2
The normal source of cin object is
Choose an answer
File
Disk
Keyboard
RAM
Previous
Skip
Next
Question # 3
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 # 4
Every class contains _______________.
Choose an answer
Constructor
Destructor
Both a constructor and a destructor
None of the given options
Previous
Skip
Next
Question # 5
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 # 6
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 # 7
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 # 8
Overloaded new operator function takes parameter of type size_t and returns
Choose an answer
void (nothing)
void pointer
object pointer
int pointer
Previous
Skip
Next
Question # 9
Pointer is a variable which store
Choose an answer
Data
Memory Address
Data Type
Values
Previous
Skip
Next
Question # 10
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 # 11
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 # 12
Memory allocated at run time is a system resource and it is the responsibility of _____ to de-allocate the memory.
Choose an answer
System
Programmer
User of program
None of given options
Previous
Skip
Next
Question # 13
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 # 14
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 # 15
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 # 16
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 # 17
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 # 18
Class is a user defined___________.
Choose an answer
Data type
Memory referee
Value
None of the given options
Previous
Skip
Next
Question # 19
What is the sequence of event(s) when deallocating memory using delete operator?
Choose an answer
Only block of memory is deallocated for objects
Only destructor is called for objects
Memory is deallocated first before calling destructor
Destructor is called first before deallocating memory
Previous
Skip
Next
Question # 20
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
Question # 21
For which values of the integer _value will the following code becomes an infinite loop? int number=1; while (true) { cout << number; if (number == 3) break; number += integer_value; }.
Choose an answer
any number other than 1 or 2
only 0
only 1
only 2
Previous
Skip
Next
Back