For an array declared as int arr[50], calculate the address of arr[35], if Base(arr) =1000 and width=2
Answers
Answered by
17
Answer:
Explanation:
BASE(Arr)=1000 ,Width=2
address(35)=Base(add.)+w(35-L.B)
1000+2(35)=1070
address of arr[35] =1070
Answered by
8
The address of arr[35] for the given array is .
Explanation:
- Let there be an array of 'n' elements having base address 'x'.
- Then the size of each element in memory address is referred as the width of the array. Let that be denoted by 'b'.
- Then the address 'A' of 'i' index of the array is given by,
- Here, we have an array 'arr' and .
- Then the required address is given by,
Similar questions
CBSE BOARD X,
12 days ago
Hindi,
12 days ago
CBSE BOARD XII,
26 days ago
Science,
26 days ago
Math,
8 months ago
English,
8 months ago