employer cover photo
employer logo
employer logo

Siemens Digital Industries Software

Engaged Employer

Siemens Digital Industries Software Interview Question

What is the difference between pass-by-value and pass-by-reference? How is each denoted?

Interview Answer

Anonymous

Jul 26, 2017

Pass-by-value is a function call that creates copies of all parameters. It is the standard function call, and is denoted with just the variable name. Pass-by-reference passes a reference to an object so that the original object can be modified in the called function, and it is denoted with an & character.