What’s Going on Behind the Scenes?
Recall that variables are implemented in memory locations
In the proceeding piece of code first_num and second_num are assigned to a pair of memory locations, say 1000 and 1004
When get_numbers(first_num, second_num) is called from main the following steps occur:
- addresses of first_num and second_num are determined
- these addresses are passed in and bound to the formal parameters input1 and input2 (in other words the address of input1 is the same as first_num (1000) and the address of input2 is the same as second_num (1004)