Question: Which selection correctly implements the following pseudocode? while( int2 int2) mov ebx,0 else mov ebx,int1 } A top: mov eax,int2 cmp eax,int1 jge L3 add

Which selection correctly implements the following pseudocode?

while( int2 <= int1 )

{

add ebx,2

if( ebx > int2)

mov ebx,0

else

mov ebx,int1

}

A

top:

mov eax,int2

cmp eax,int1

jge L3

add ebx,2

cmp ebx,int2

jg L2

mov ebx,int1

jmp L3

L1: mov ebx,0

L2: jmp top

L3:

B

top:

mov eax,int1

cmp eax,int2

jl L3

add ebx,2

cmp ebx,int2

jg L1

mov ebx,int1

jmp L2

L1: mov ebx,0

L2: jmp top

L3:

C

top:

mov eax,int2

cmp eax,int1

jl L3

add ebx,2

cmp ebx,int2

jg L1

mov ebx,int1

jmp L2

L1: mov ebx,0

L2: jmp top

L3:

D

top:

mov eax,int2

cmp eax,int1

jg L3

add ebx,2

cmp ebx,int2

jg L1

mov ebx,int1

jmp L2

L1: mov ebx,0

L2: jmp top

L3:

Please Explain Your Answer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!