Discussion :: References
-
Which of the following statement is correct about the program given below?
#include class FresherGate { int x, y; public: FresherGate(int xx = 0, int yy = 0) { x = xx; y = yy; } void Display() { cout" " operator +(IndiaBix z) { FresherGate objTemp; objTemp.x = x + z.x; objTemp.y = y + z.y; return objTemp; } }; int main() { FresherGate objGate1(90, 80); FresherGate objGate2(10, 20); FresherGate objSum; FresherGate &objRef = objSum; objRef = objGate1 + objGate2; objRef.Display(); return 0; }
|
A.
It will result in a runtime error. |
|
B.
It will result in a compile time error. |
|
C.
The program will print the output 9 4. |
|
D.
The program will print the output 100 100. |
Answer : Option D
Explanation :
No answer description available for this question.
Be The First To Comment

Whatsapp
Facebook