(A) True
(B) False
Tag: Object Oriented Programming Mcqs
The compiler won‘t object if you overload the * operator to perform division.
(A) True
(B) False
Static variables act like a global variable in the context or scope of the class.
(A) True
(B) False
The >= operator can be overloaded.
(A) True
(B) False
Using encapsulation we can achieve?
(A) Information hiding
(B) Least interdependencies among modules
(C) Implementation independenc
(D) All of given options
A member function having the same name as that of a class and a ~ sign with it is called?
(A) Getter
(B) Constructor
(C) Destructor
(D) Setter
We can get only one unique value which can be used by all the objects of that class by the use of?
(A) Static variables
(B) Dynamic variables
(C) Instance variables
(D) Data members
Suppose obj1 and obj2 are two objects of a user defined class A. An + operator is overloaded to add obj1 and obj2 using the function call obj1+obj2. Identify the correct function prototype against the given call?
(A) A operator + ( A &obj);
(B) int + operator();
(C) int operator (plus) ();
(D) A operator(A &obj3);