Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
16.7k views
in Computer by (48.9k points)
closed by

An array AR [-4…. 6, -2 ….. 12 ], stores elements in Row Major Wise, with the address AR[2] [3] as 4142 . If each element requires 2 bytes of storage, find the Base address.

1 Answer

+1 vote
by (49.9k points)
selected by
 
Best answer

AR [-4,… 6, -2 … 12]

Row- wise order, 

AR[2] [3] = B + W(n(i-1)+(j-1)) 

Given i = 2, j = 3, W = 2 bytes 

B = ? 

n = Uc – Lc + 1 

= 12 – (-2) + 1 

= 12 + 2 + 1 

= 15 Now, 414 

= B + 2 [15 (2 -(-2)) + (3-(-4))] 

B + 2[60 + 7] 

= 4142 B + 134 

= 4142 or B = 4008

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...