Answered step by step
Verified Expert Solution
Link Copied!

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.

Follow the same format as this example.

image text in transcribed

-------------------

------------------

Solve this:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

Question What integration level should an employer choose?

Answered: 1 week ago