Question: ignore the given answers Question 4 Consider the following code fragment where the right-hand side of the assignments in func are to be completed by

ignore the given answers
Question 4 Consider the following code fragment where the right-hand side of the assignments in func are to be completed by answering this question (and the next question): typedef struct point f float 'p struct t float x float y struct point next; point; void func(point spi, point sp2) ( int main) point init, "final; // assume init has been initialized to some value func(init, final); return The compiler generates the following assembly code for the body of func: push %ebp mov %esp, %ebp mov ??8(%ebp), %eax lea 8x4(%eax), %edx mov oc(%ebp), %eax mov %eax, (%eax) mov 0x8 (xebp), xeax mov ex8(%eax), %eax mov exc(%ebp), %edx mov %eax,8x4(%edx) mov 8x8 (xebp), xeax nov 8x4(%eax), %eax mov exc (%ebp), %edx mov %eax,8x8(%eax) nov 6x8(%ebp), %eax mov 8xc (xebp), xedx mov %edx,6xE(%eax) mov ???(%ebp), %eax movi sexe, exc(%eax) pop %ebp ret Complete the first two assignment statements by answering the following: The value of Ais sp1->p The value of B is sp1->s.x The value of C is spi->s.y
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
