MCQs > IT & Programming > C++ > What's a 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's a 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 argument is passed as a reference, so if the passed my_array object is large, the program will require less time and memory.

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