Question: S. For the following C program, show the stack activation frame and answer the (assume param/local variables are pashed on the stack from right-to-left -all
S. For the following C program, show the stack activation frame and answer the (assume param/local variables are pashed on the stack from right-to-left -all in size, program started as Mal in emd.exe types are 4 bytes void foo (int a, int int tmp; tmp a + *b; void main(int arge, chararg!) int x. y x=2; foo(2, &y): At A: mov eax, [ebp-4] eax mov eax, [ebp+8] eax- mov eax, [ebp+12] eax- At B: mov eax, [ebp-4] cax- mov eax, [ebp-8) eax- mov eax, [ebp+8 eax mov eax, (ebp+12) eax S. For the following C program, show the stack activation frame and answer the (assume param/local variables are pashed on the stack from right-to-left -all in size, program started as Mal in emd.exe types are 4 bytes void foo (int a, int int tmp; tmp a + *b; void main(int arge, chararg!) int x. y x=2; foo(2, &y): At A: mov eax, [ebp-4] eax mov eax, [ebp+8] eax- mov eax, [ebp+12] eax- At B: mov eax, [ebp-4] cax- mov eax, [ebp-8) eax- mov eax, [ebp+8 eax mov eax, (ebp+12) eax
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
