Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the following code draw the Control flow graph along with the interptetati

ID: 3708379 • Letter: G

Question

Given the following code draw the Control flow graph along with the interptetation of the predicates (as in Table 6.1 of textbook) and then show graphically the domain obtained from the control flow graph. Use Figure 6.2, 6.3, 6.4, and Table 6.1 of textbook as guide. Provide explanation of your work when necessary 01 02 03 04 05 06 07 08 09 10 int domaintester (int x, int y) int c= 0, d= 0, k= 0; if (c 7) d = c - x/4; d = c + x/4; if (d >= c 4) else 12 13 14 15 16 17 k = x + d/4; else k y +d/8; return k;

Explanation / Answer

Hi, We can not refer your book. So Always provide all images or source code for your question. Explaination of your provided code : Below is the code for your problem with proper description provided within comments itself. // defination of a funtion that take two int parameter and return a int value int domaintester(int x,int y) { int c = 0, d = 0, k = 0; // local variables having scope inside function only // initialize all variable as 0 c = 2*x + y; // calculate c // condition if (c > 7) // if value of c is ge=retaer than 7, then run this d = c - x/4; // calculate value of d if c > 7 else d = c + x/4; // calculate value of d if c= c + 4) // if value of d is greater than (c +4), then run it k = x + d/4; // calculate value of k if (d>=c+4) else k = y + d/8; // calculate value of k if (d
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote