Pergunta de entrevista da empresa Siemens Digital Industries Software

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

Resposta da entrevista

Sigiloso

26 de jul. de 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.