parameters value reference Flashcards
1
Q
what is passing a parameter by value
A
A local copy of the data is used
Data is discarded when the
subprogram exits
Does not override/change the original
data
2
Q
what is passing a parameter by reference
A
address of the parameter is given to the subroutine, so the
value of the parameter will be updated at the given address. Changes remain after the subprogram
exits