UrbanPro
true

Learn Programming Languages from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Address Calculation in Two Dimensional Arrays

Talla Veerendranath
19/09/2019 0 0

Addresses of  Two Dimensional arrays can be calculated by using

1. Row Major representation

2. Column major Representation

1. Row Major representaion: Let X be an array of M Rows and N Columns

Address Location (X [i, j]) = Base Adress of  X + S [N (i-LBofrow) + (j -LBofCol)]

i and j indicates index value of the element whose address you want to search.

Base Adress of  X  is the starting address of the given array. 

S is the memory word required to store given array’s element. 

LBofrow is Lower Boundary of Rows

LBofCol is Lower Boundary of Columns

Example : 

Rows:  2   Columns : 3

   3     4   5
  2     1   6

   0         1         2     

Let base address be 200

w be 2 bytes(int)

Address of x[1,0]=200+2[3[1-0]+[0-0]]

                         =200+2[3-0]

                         =200+6

                         =206

2 Column Major Representation

Address Location (X [i, j]) =  Base Adress of  X + S [(j- LBofrow) +M(i - LBofCol)]

 

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

Black in Python
When you are upturn in your career from beginner to experienced in programming world, your team will start looking at ‘how you are writing?’ Here the responsibility piling up. Okay,...

Be A Python Dev
Currently, in the programming world, Python is one of the languages with a high rising demand profile. And this article will explain why that isn’t slowing down in the foreseeable future.Python...

The ABCs Of Success For A Software Developer
“There is more to know for career advancement rather than focusing on codes and its challenges to become a successful developer”. A developer is the one who creates software application by...

HTML(Hypertext Markup Language) for creating web pages by Kris, konrad, andy
Html stands for Hypertext Markup Language. It's the computer language at the heart of World Wide Web. When creating a website, html is used to put text, pictures, animations, video, sound onto individual...

What is the output of this programming?
#include<stdio.h> main() { printf("%d chennai",+1); }
A
X

Looking for Programming Languages Classes?

The best tutors for Programming Languages Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Programming Languages with the Best Tutors

The best Tutors for Programming Languages Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more