Social Sciences, asked by singhharsh1177, 9 months ago

Consider the following arithmetic operations in C: int X-20; int Y-20; int Z-2*(X Y) which assembly code(0x86) does not evaluate value for Z correctly? mov eax.X b) mov ebx. Y add eax ebx mov el.4 mov ebx.Y a) add eax.ebx mov cl.2 imul cl mov Z eax imul cl shr eax. 1 mov Z.eax d) mov eax.X mov ebx.Y add eax.ebx shl eax, I mov Z,eax mov eax X c) mov ebx,Y shl eax.2 shl eax.2 add eax.ebx

Answers

Answered by antiochus
40

Answer:

Here Question is the option which doesn't evaluate Z correctly then the answer is A

But, if you see which option doesn't evaluate Z then the Answer is C

c) Operation

It calculates the value . But, never stores the value in Z.

a) Operation

It evaluates the value of Z in-correctly.As, it never considers the value of X and without any check it adds the value of ebx i.e Y to eax .

Answered by mohdamir73
0

Explanation:

consider the following arithmetic operation in c

Similar questions