If the base address of a two dimensional array A[30][40] is 300, then find out the address of an element A[4] [3] the Assume 4 words per memory cell and elements are arranged in row major order.
Answers
Answered by
20
Answer:
The distribution below gives the weights of 30 students of a class. Find the median weight of the students.
Weight (in kg)
40 − 45
45 − 50
50 − 55
55 − 60
60 − 65
65 − 70
70 − 75
Number of students
2
3
8
6
6
3
Answered by
7
Address of an element A[4] [3] is 956
Explanation:
- Each cell needs 4 words
- A[0][0], A[0] [1] to A[0] [39] needs 4x40 =160 words
- Similarly, from A[0][0] to A[3][39] there are 4x40=160 elements.
- From A[4][0] to A[4][3]there are 4 elements.
- Total 164 elements are present before A[4][3].
Hence A[4][3] will be at 300+ 4x164 = 956
Similar questions
Social Sciences,
18 days ago
Physics,
18 days ago
Math,
1 month ago
Math,
9 months ago
Science,
9 months ago