Optum Interview Question

what is pass by value and pass by reference ?

Interview Answer

Anonymous

Oct 3, 2024

Pass by Value: A copy of the variable is passed to the function, so changes made inside the function do not affect the original variable. Pass by Reference: The actual variable is passed to the function, so changes made inside the function directly modify the original variable.