1/24/00
COM1100 Winter2000 Lecture 7
11
Actual and Formal arguments – pass by value
nWhen main function calls Swap functions
nFirst makes copies of actual arguments m and n
nUse copies to initialize formal argument x and y
nAny changes made for x and y in Swap have nothing to do with actual argument m and n
nBecause only values of m and n passed into function Swap