Professional Documents
Culture Documents
Lab Week 6 Worksheet
Lab Week 6 Worksheet
Lab Week 6 Worksheet
(Prof. Theys)
Lab Week 6
Name: UIN:
Name: UIN:
Please answer the following questions about two arrays “myArray” and “cube” declared in the
provided C code. (100 Points)
4) What values (in hex) can the least significant nibble of the address for myArray[i] be? (10
points)
5) What is the equation to find the address of element myArray[i]? (10 points)
7) What is the starting address of the second row of cube (address of element cube[0][1][0])? (5
points)
9) What is the starting address of the second plane of cube (address of element cube[1][0][0]);
(5 points)
10) How many bytes are in a plane of cube? (10 points)
11) What is the equation required to determine the address of cube[i][j][k]? Your answer should
use i,j,k in the equation and information from questions 6-10. (20 points)
12) If the 3d array cube, is changed to be a struct of size 32 bytes instead of short, how would
your equation in 11 change? (10 points)