Pergunta de entrevista da empresa Fast Enterprises

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

Resposta da entrevista

Sigiloso

17 de fev. de 2025

Pass-by-reference will pass the memory address of the variable to the function which can be directly modified by that function. Pass-by-value will pass a copy of the variable's data to the function and when changed, will not modify the original variable.