Physics · C Programming
One of the disadvantages of the 'pass by reference' mechanism is that the called function may inadvertently modify the caller's data. In C++, how can this side effect be prevented while retaining the reference passing mechanism?
- 1By wrapping the function call inside a macro
- 2By declaring the actual parameters as 'const'
- 3By declaring the formal parameters as 'const'✓
- 4By passing pointers instead of references
Correct answer
By declaring the formal parameters as 'const'
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Physics?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on C Programming?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Physics · C Programming