Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following C functions and assembly code: int fun2(int *ap, int *bp) { int a = *ap; *ap += *bp; return a; } int

Consider the following C functions and assembly code:

int fun2(int *ap, int *bp) { int a = *ap; *ap += *bp; return a; }

int fun3(int *ap, int *bp) { int a = bp; *bp += *ap; return a; }

int fun4(int *ap, int *bp) { int a = *ap; int b = *bp; return a+b; }

int fun5(int *ap, int *bp) { int b = *bp; *bp += *ap; return b; } int fun6(int *ap, int *bp) { int a = *ap; *bp += *ap; return a; } pushl %ebp movl %esp,%ebp movl 8(%ebp),%edx movl 12(%ebp),%eax movl %ebp,%esp movl (%edx),%edx addl %edx,(%eax) movl %edx,%eax popl %ebp ret

Which of the functions compiled into the assembly code shown above?

Group of answer choices

fun2

fun4

fun5

fun3

fun6

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

Step: 3

blur-text-image

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

Ehs 2.0 Revolutionizing The Future Of Safety With Digital Technology

Authors: Tony Mudd

1st Edition

B0CN69B3HW, 979-8867463663

More Books

Students also viewed these Databases questions

Question

DNS cannit run on the same server as a AD domain controller T or F

Answered: 1 week ago

Question

9. Explain the relationship between identity and communication.

Answered: 1 week ago

Question

a. How do you think these stereotypes developed?

Answered: 1 week ago

Question

a. How many different groups were represented?

Answered: 1 week ago