MCQs > IT & Programming > C++ > What is one benefit of declaring the parameter as a const reference instead of declaring it as a regular object? int median(const my_array& a)

C++ MCQs

What is one benefit of declaring the parameter as a const reference instead of declaring it as a regular object? int median(const my_array& a)

Answer

Correct Answer: The const qualifier Forbids the code to modify the argument, so the programmer can rest assured that the source object will remain unchanged.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it