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
889 views
in Computer by (50.9k points)
closed by

An array P[30][20] is stored along the column in the memory with each element requiring 2 bytes of storage. If the base address of the array P is 26500, find out the location of P[20] [10]

1 Answer

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

Total number of rows (R) = 30 

Size of each element (W) = 2 

Base Address (B) = 26500 

Assuming lower bound of row(LBR) = 0 

and lower bound of column (LBC) = 0 

LOC(P[l][J]) = B+W[(I – LBR) + (J – LBC)*R] 

LOC(P[20][10]) = 26500 + 2[(20 – 0) + (10 – 0) * 30] 

= 26500 + 2[20 + 10 x 30] 

= 26500 + 2[20 +300] 

= 26500 + 2 x 320 

= 26500 + 640 

= 27140 

Hence, Location of P[20][10] is 27140.

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

...