Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
Below is a sample problem, please follow this format:
---------------------------HELP ME WITH THE FOLLOWING PLEASE!---------------------------
Thank you in advance !
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? "); scanf(" % d", & num2); answernum1 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 8 10. 12. 13. 14 15 16. DEF-USE Table Variable numl num2 DEF 3,7 4,10 5,11 USE 11,12 11,13 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 num2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started