Question: Consider the following source code, where M and N are constants declared with #define: In compiling this program, gcc generates the following assembly code: Use
Consider the following source code, where M and N are constants declared with #define:
![long P [M] [N]; long Q[N] [M]; long sum_element (long i, long j) { return P[i] [j] + Q[j] [i]; }](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1698/1/4/3/68565379dc5bc9851698143684260.jpg)
In compiling this program, gcc generates the following assembly code:

Use your reverse engineering skills to determine the values ofM and N based on this assembly code.
long P [M] [N]; long Q[N] [M]; long sum_element (long i, long j) { return P[i][j] + Q[j][i]; }
Step by Step Solution
3.48 Rating (155 Votes )
There are 3 Steps involved in it
This problem requires you to work through the scaling operations to determi... View full answer
Get step-by-step solutions from verified subject matter experts
