C++ | const keyword | Question 3
Predict the output of following program.
(A) Garbage Values
(B) 0 0
(C) Compiler Error in line cout << t.getX() << " ";
(D) Compiler Error in line cout << t.getY();
Explanation: There is compiler Error in line cout << t.getY();
A const object can only call const functions.
Quiz of this Question