Question

Subject: System Test & Verification Draw the graph that represents this section of code             X=1...

Subject: System Test & Verification

  1. Draw the graph that represents this section of code

            X=1

            While x > y

                  Y = b +1

                  If (y = = 0)

                       break

                 else

                       y = y*2

                       X = X+1          

                 end

            end                 

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

here blue edges are for last use of data and black edges are for computed from

code

    1.            X=1
    2.                       While x > y
    3.                            Y = b +1
    4.                            If (y = = 0)
    5.                                break
                                else
    6.                                y = y*2
    7.                                X = X+1       
                                end  
                            end

Explanation

here we will call variables by their number in graph shown

first initialixe x1=1

then control transfers to x2 and condition is check

then control transfers to y3 and result is computed by b4 and 1_5
then again condition check at y6
if true then nothing
else    control transfers to y7
        y7 is computed ad y3 and 2

        then control transfers to x9
        and x9 is computed by x2 and 1

end

2 X b Y 1 6 Y Y 2 X

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Subject: System Test & Verification Draw the graph that represents this section of code             X=1...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Subject: System Testing & Verification Q: There were three aspects to Test and Verification in this course (a) test...

    Subject: System Testing & Verification Q: There were three aspects to Test and Verification in this course (a) test abstraction, and (b) testing code fragments and (c) coding and debugging in Visual Logic. Which of these three approaches was the most meaningful to you?

  • SUBJECT - SYSTEM TEST & VERIFICATION If you are/were employed at a software company, what LEVEL...

    SUBJECT - SYSTEM TEST & VERIFICATION If you are/were employed at a software company, what LEVEL of TEST MATURITY would you say the company had and why ? 2b           What LEVEL of TEST MATURITY would you say you have at home or at school and why ? The levels are 0 testing=debugging; 1=testing shows correctness; 2=testing shows program doesn’t work; 3=testing reduces risk; 4=testing is a mental discipline about quality. ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ Why do testers automate tests? What are...

  • Solve equation (4) in Section 5.2 ΕΙ = w(x) (4) dx4 subject to the appropriate boundary...

    Solve equation (4) in Section 5.2 ΕΙ = w(x) (4) dx4 subject to the appropriate boundary conditions. The beam is of length L, and wo is a constant. (a) The beam is embedded at its left end and free at its right end, and w(x) = Wo, 0<x<L. Wo y(x) = - 2Lx + 3 L’x) 24EI x (b) Use a graphing utility to graph the deflection curve when wo = 24EI and L = 1. X X 0.2 0.4...

  • 1. Write a code to draw a ‘mesh' graph of following function f(x,y)= xy x >...

    1. Write a code to draw a ‘mesh' graph of following function f(x,y)= xy x > 0, y 0 xy2 x 20, y = 0 x<0, y=0 (x?y2 x <0, y < 0 x? y Hint) You need to use “meshgrid', ‘for’and ‘if' commands (30 points)

  • Solve equation (4) in Section 5.2 E = w(x) (4) subject to the appropriate boundary conditions....

    Solve equation (4) in Section 5.2 E = w(x) (4) subject to the appropriate boundary conditions. The beam is of length L, and wo is a constant. (a) The beam is embedded at its left end and simply supported at its right end, and w(x) = wg. 0<x<L. y(x) = (b) Use a graphing utility to graph the deflection curve when wo = 48E1 and L = 1. y + 0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1...

  • Solve equation (4) in Section 5.2 FIdywx) dxA (4) subject to the appropriate boundary conditions. The...

    Solve equation (4) in Section 5.2 FIdywx) dxA (4) subject to the appropriate boundary conditions. The beam is of length L, and wo is a constant. (a) The beam is embedded at its left end and simply supported at its right end, and w(x) wo, 0 < x < L. усх) (b) Use a graphing utility to graph the deflection curve when wo 48EI and L = 1. = y y 0.2 0.4 0.6 0.8 1,0 0.2 0.4 0.6 0.8...

  • 20) What is the output of the following segment of C code: int avg(int n, int*...

    20) What is the output of the following segment of C code: int avg(int n, int* a); int main () {             int array[4]={1,0,6,9};             printf("%d", avg(4, array)+ 1);             system("pause");             return 0; } int avg(int n, int* a) { int i, sum=0; for (i=0;i<n;i++) { sum+=a[i]; } return sum/n; } a) 16 b) 5 c) 4 d) 8 21) What is the output of the following segment of C code: int x = 2; int y = 3;...

  • (a)How many times does the code snippet given below display "Hello"? int x = 1; while...

    (a)How many times does the code snippet given below display "Hello"? int x = 1; while (x != 15) {    System.out.println ("Hello");    x++; } (b)What is the output of the following code fragment? int i = 1; int sum = 0; while (i <= 5) {    sum = sum + i;    i++; } System.out.println("The value of sum is " + sum); Quie 2 What is the output of the following snipped code? public class Test {...

  • (15 pts) 1. Draw a logic diagram for the Verilog code. module Seq_Ckt ( CLK, PR,...

    (15 pts) 1. Draw a logic diagram for the Verilog code. module Seq_Ckt ( CLK, PR, sel, Q); input CLK, PR, sel; output reg [2:0] Q; reg [2:0] y; assign Q = y; always @ (posedge PR, posedge CLK) begin if (PR== 1) then y <= 3'b111; else if (sel) begin y[2] <= y[1] ^ y[0]; y[1] <= y[2]; y[1]; end else y[2] <= y[2] ; y[1] <= y[1]; y[0]; y[O] <= y[0] <= end endmodule

  • Complete the following. (a) The graph of y=g() is shown. Draw the graph of y= g(-x)+1....

    Complete the following. (a) The graph of y=g() is shown. Draw the graph of y= g(-x)+1. (b) The graph of y=16) is shown. Draw the graph of y=246)-4. X ? х 5 2

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT