Question: typedef struct Point int x; int y; y Point; int func (Point pl, Point p2); int main()( Point pl, p2; p1.y 10; p2.x = 2;

 typedef struct Point int x; int y; y Point; int func

typedef struct Point int x; int y; y Point; int func (Point pl, Point p2); int main()( Point pl, p2; p1.y 10; p2.x = 2; p2.y6; printf ("%d ", func ( p1, p2)); return 0; func: pushl %ebp movl %esp, %ebp pushl %esi subl $20, %esp movl 20(%ebp), %eax movl 16(%ebp ) , %ecx movl 12(%ebp ) , %edx movl 8(%ebp ) , %esi movl %esi, -16(%ebp) movl %eax, -12 ( %ebp ) movl %ecx, -24(%ebp ) movl %eax, -20(%ebp) movl -12(%ebp ) , %eax addi -24(%ebp ) , %eax addi $20, %esp popl %esi popl %ebp ret Given the assembly code for func, the output of the program is: typedef struct Point int x; int y; y Point; int func (Point pl, Point p2); int main()( Point pl, p2; p1.y 10; p2.x = 2; p2.y6; printf ("%d ", func ( p1, p2)); return 0; func: pushl %ebp movl %esp, %ebp pushl %esi subl $20, %esp movl 20(%ebp), %eax movl 16(%ebp ) , %ecx movl 12(%ebp ) , %edx movl 8(%ebp ) , %esi movl %esi, -16(%ebp) movl %eax, -12 ( %ebp ) movl %ecx, -24(%ebp ) movl %eax, -20(%ebp) movl -12(%ebp ) , %eax addi -24(%ebp ) , %eax addi $20, %esp popl %esi popl %ebp ret Given the assembly code for func, the output of the program is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!