Question PRG-CPP-0075
HardWhy is passing large objects as 'const T&' common in C++?
- A.
It makes the object global
- B.
It is required for templates
- 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
C++ question
Why is passing large objects as 'const T&' common in C++?
It makes the object global
It is required for templates
Sign up free to see the answer and a step-by-step explanation.
It forces a copy
It avoids copying while promising not to modify the argument