Question
Considering the pseudo code listed below 1. read x; 2. i = 0; 3. while (i < x){ 4. if ((i mod 7) = =
Considering the pseudo code listed below 1. read x; 2. i = 0; 3. while (i < x){ 4. if ((i mod 7) = = 5){ 5. i = i + 2; 6. x = x +1; 7. print x; } 8. else i = i + 1; 9. if ((i mod 7) = = 6) 10. x = x +1; } 11. print x; Answer the following three questions: (1) Draw the control flow graph of this program (10 points) (2) For each node, check if there are Definition, C-use or P-use for any variable. List Definition, C-use or/and P-use for all variables (15 points) (3) List all def-c-use pairs with respect to the variable x. Use the format (var x, def_line_number, use_line_number) (10 points
Step 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