Multiple Choice Questions in C++ (Set-X)

Multiple Choice Questions in C++




Multiple choice questions in C++ (With answers)

91. Which of the following statements regarding operator overloading is not true?
a) New operators cannot be created while overloading
b) The semantics of an operator cannot be changed while overloading
c) Subscript operator([]) can be overloaded
d) None of the above

92. Which of the following statements can be overloaded?
a) Size of operator
b) Scope resolution operator (::)
c) Class member access operator (->)
d) Pointer to member operator

93. Operator functions
a) Can return a value
b) Cannot return a value
c) May return values of limited data types
d) None of the above

94. While overloading, a unary operator
a) Takes no arguments
b) Takes one argument
c) Takes two arguments
d) None of the above
95. While overloading, a binary operator
a) takes no argument
b) takes one argument
c) takes two arguments
d) none of the above

96. Which of the following operators cannot be overloaded?
a) increment and decrement operator
b) function call operator, ()
c) subscript operator, []
d) none of the above

97. When an arithmetic assignment operator is overloaded, the result
a) goes in the object to the left of the operator
b) goes in the object to the right of the operator
c) goes in the object of which the operator is a member
d) none of the above

98. The function that overloads as operator, precedes with the keyword
a) function
b) operator
c) virtual
d) static

99. The symbol **
a) can be overloaded
b) cannot be overloaded as it is not a C++ operator
c) cannot be overloaded, as on overloading its meaning shall be changed
d) none of the above

100. The stream insertion and extraction operators should be overloaded as
a) friend functions
b) member function
c) non member functions
d) none of the above




Solution Set to Multiple Choice Questions

(91)       D          (92)       C

(93)       A          (94)       A          (95)       B          (96)       D

(97)       A          (98)       B          (99)       B          (100)      A



You cannot copy content of this page.