When passing parameters by reference, which symbol is used to denote reference in C++?
- #
- @
- &
- %
In C++, the ampersand (&) is used to denote that a parameter is being passed by reference. This allows the function to directly access and modify the actual argument's memory location.
Loading...
Related Quiz
- What is the primary purpose of encapsulation in object-oriented programming in C++?
- The use of _______ in nested if-else structures can sometimes enhance readability and maintainability of the code.
- You are tasked with implementing a recursive algorithm that, during testing, experiences a stack overflow error. Which approach might be most effective in resolving this issue without significantly altering the algorithm?
- Which of the following C++ versions introduced the auto keyword for automatic type deduction?
- To read an entire string from a file, instead of a single character, use the _______ function.