Question: 1) Construct a table listing all the line numbers where a variable is defined or used. You must list all the variables in each source
1) Construct a table listing all the line numbers where a variable is defined or used. You must list all the variables in each source code fragment. 2) Construct a DU Path table showing all paths from any definition to usage of every variable.
Follow the same format as this example.

-------------------
------------------
Solve this:

A sample example is given below: int main() 1. example int num1; int num2; int answer; printf("This program finds the product of two numbers\ n"); printf("What is your first number ? "); scanf(" % d", & num1); printf("What is your second number? n"); scanf(" % d", & num2); answer = num1 * num2; printf("Your first number was % 15 d\ n", num1); printf("Your second number was % 15 d\ n", num2); printf("The product is % 22 d\ n", answer); return 0; 4 6 10. 12 13. 14. 15 16. DEF-USE Table Variable numl num2 DEF 3,7 4,10 5,11 USE 11,12 11,13 14 answer DU Path Table Variable numl DU Path 8-9-10-11 8-9-10-11-12 10-11 10-11-12-13 11-12-13-14 num2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
