Assume all variables are signed 32-bit quantities, except for when you can tell
ID: 3689707 • Letter: A
Question
Assume all variables are signed 32-bit quantities, except for when you can tell they are characters. Topic: Array addressing Memory is reserved for an array of 2048 4-byte integers. How many bytes are reserved? Memory is reserved for an array of 2048 4-byte integers starting at address 0AC54h. What is the address of the last element of the array. Array arr1 has 512 elements, where each element is a 1-byte character. If the starting address of the array is 0FB68h, what is the address of arr1[367]? Array arr2 has 512 elements, where each element is a 4-byte integer. If the starting address of the array is 0FB68h, what is the address of arr1[367]?Explanation / Answer
Q1. For an array of size 2048 , total bytes reserved are 2048*4= 8192 bytes.
Q2. If starting address of array is 0AC54h which is equivalent to 44116 decimal
Thus in decimal number system starting addres of array is 44116 and last address will be 44116+8192-1 = 52307 which is equivalent to CC53h
Q3. Starting address of array is FB68h = 64360 which means arr1[0] will be at 64360 and arr1[367] will be 64360+367 = 64727 which is equivalent to FCD7h
Q4. Starting address of array is FB68h = 64360 which means arr1[0] will be at 64360 and arr1[1] will be 64360+(1*4) = 64634 and arr1[367] will be 64630+(367*4) =66098 which is equivalent to 10232h
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.