Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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):

image text in transcribed

The compiler generates the following assembly code for the body of func:

push %ebp mov %esp,%ebp mov 0x8(%ebp),%eax lea 0x4(%eax),%edx mov 0xc(%ebp),%eax mov %edx,(%eax) mov 0x8(%ebp),%eax mov 0x8(%eax),%eax mov 0xc(%ebp),%edx mov %eax,0x4(%edx) mov 0x8(%ebp),%eax mov 0x4(%eax),%eax mov 0xc(%ebp),%edx mov %eax,0x8(%edx) mov 0x8(%ebp),%eax mov 0xc(%ebp),%edx mov %edx,0xc(%eax) mov 0xc(%ebp),%eax movl $0x0,0xc(%eax) pop %ebp ret 

what is the value of A, B and C, D and E respectively?

typedef struct point i float *p; struct -i float x:; float y; struct point* next; point; void func(point *spl, point* sp2) I sp2->p = A; spi-next sp2-next D; E; - int mainO point *init, *final; // assume init has been initialized to some value func(init, final); return 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

Describe who reads a business plan and what they are looking for.

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago