Question: Give me the process Question 1: Suppose p is a pointer to an array of 4-byte floats at memory address 0x8738. What is the address

Give me the process

Question 1:

Suppose p is a pointer to an array of 4-byte floats at memory address 0x8738. What is the address of p[4]?

Question 2:

long Give me the process Question 1: Suppose p is a pointer toA[M][N]; long an array of 4-byte floats at memory address 0x8738. What is theB[N][M]; long foo(long i, long j) { return address of p[4]? Question 2: long A[M][N]; long B[N][M]; long foo(long i,A[i][j]+B[j][i]; }

Fill in the values of M and N so that the c code produces this assembly code:

foo: leaq 0(,%rdi,8), %rdx subq %rdi, %rdx addq %rsi, %rdx leaq (%rsi,%rsi,8), %rax addq %rax, %rdi movq B(,%rdi,8), %rax addq A(,%rdx,8), %rax ret

Transcribed image text

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!