3.64 Multiple Dimension Array I
★★★
Consider the following source code, where R, S and T are constants declare with #define:
In compiling this program, GCC generates the following assembly code:
A. Extend Equation 3.1 from two dimensions to three to provide a formula for the location of array element A[i][j][k]
.
B. Use your reverse engineering skills to determine the values of R, S, and T based on the assembly code.
From the code we know that S*T=65
, T=13
, and R*S*T=455
, so S=5, T=13, and R=7.
Last updated