December 2021
Beginner
840 pages
47h 29m
English
We start by surveying parameter-passing mechanisms in a variety of languages prior to discussing implementation strategies for these mechanisms.
Pass-by-value is a parameter-passing mechanism in which copies of the arguments are passed to the function. For this reason, pass-by-value is sometimes referred to as pass-by-copy. Consider the classical swap function in C:
C only passes arguments by value (i.e., by copy). Figure 12.2 shows the run-time stack of this ...