Question: This all question 2. Copy the program of swap.cpp from Figure 6 to a new file or online programming Mark editor/compiler. Then, compile and run
2. Copy the program of swap.cpp from Figure 6 to a new file or online programming Mark editor/compiler. Then, compile and run the program. Observe the output, is it similar with the expected output? Prove your reason. Answer: /2 Practice 03: Passing Argument to Function: Pass by Reference (5 marks) /5 N 1. Create function definition call swapNum as highlighted in Figure 6, where it can swap two numbers. This function must receive reference addresses of two variable numbers pass by the caller. I Answer: Figure 6 Mark: 2. Copy the program of swap.cpp from Figure 6 to a new file or online programming editor/compiler. Then, compile and run the program. Observe the output. Is it similar with the expected outpute Prove your reason
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
