Domanda di colloquio di Fast Enterprises

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

Risposta di colloquio

Anonimo

17 feb 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.