Question OOP-CLS-0071
HardA C++ class has a member function declared 'void show() const'. Which call is allowed on a const object of the class?
- A.
obj.show()
- B.
Neither
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Classes and Objects question
A C++ class has a member function declared 'void show() const'. Which call is allowed on a const object of the class?
obj.show()
Neither
Sign up free to see the answer and a step-by-step explanation.
Both
obj.setX(5) where setX is non-const