Question: Exercise 3. Please explain answer Fix the problems one at a time, starting with the first function. The easy way to do this is to

Exercise 3. Please explain answer Exercise 3. Please explain answer Fix the problems one at a time,

Fix the problems one at a time, starting with the first function. The easy way to do this is to comment out the unfixed functions and the calls to those functions in main. You can use the Comment and Uncomment items on the Edit menu in jGrasp to do this. Once you have fixed a function, save the program, uncomment the next function and work on it. You can fix each function by inserting or changing one line in each function. If you think you need to change more than two or three lines in a function, think harder or ask for help. Consider the following program (see lab2. zip for the source): Open the program in jGrasp and run it. The program will output four numbers. In a text file (scopetest. txt) answer the following questions about this program. (The line numbers are there to help refer to specific lines of the program.) Each of the first three numbers are output by the call to print l n on line 11. The calls to the add function (lines 9 to 12) for these three outputs are found on lines 5 to 7. For the call on line 5, what are the values of num1 and num2 at the beginning of add? (These are the num1 and num2 declared by line 9.) For the calls on lines 6 and 7, what are the values of num1 and num2 at the beginning of the function add? Make sure you explicitly identify which value is num1 and which is num2. For each of num1, num2, and num3 referenced on lines 6 and 7, which line declared that variable? The variable num3 referenced on line 10 is declared on which line of the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!