Page 1 of 1

Problem Descriptions: The purpose of this assignment is to reinforce the lecture material on variable definition /usage

Posted: Thu Jul 14, 2022 2:13 pm
by answerhappygod
Problem Descriptions The Purpose Of This Assignment Is To Reinforce The Lecture Material On Variable Definition Usage 1
Problem Descriptions The Purpose Of This Assignment Is To Reinforce The Lecture Material On Variable Definition Usage 1 (85.15 KiB) Viewed 21 times
Problem Descriptions The Purpose Of This Assignment Is To Reinforce The Lecture Material On Variable Definition Usage 2
Problem Descriptions The Purpose Of This Assignment Is To Reinforce The Lecture Material On Variable Definition Usage 2 (43.75 KiB) Viewed 21 times
Problem Descriptions The Purpose Of This Assignment Is To Reinforce The Lecture Material On Variable Definition Usage 3
Problem Descriptions The Purpose Of This Assignment Is To Reinforce The Lecture Material On Variable Definition Usage 3 (62.31 KiB) Viewed 21 times
Problem Descriptions: The purpose of this assignment is to reinforce the lecture material on variable definition /usage and DU path. For each of the source code fragments below: 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. A sample is given below: 1. Int nain() ( 2. Char operator; 3. double first Number, secondiamber; 4. print f( "Enten an operator (+,∗,+):"); 5. seanf(2×c′′+5 operator); 6. Printf("Enter two operands: ") : 7. Seanf(*)f xIf", a firsthumber, 8 secondevinber); B. If (operator: = " ∗ ) f 1e. Jelse if (operator =w∗+∗ ) ( 12. ) else 1f (operator *. "**) \{ 14. 3 else If ( operatar ==∗f∗) ) \{ 16. telse t 17. peintf("Errorl operaton is not correct"); 18. ? 19. return 9 ; 26. ] DEF-USE Table:
DU Path Table: