Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A two-dimensional array named Arr is with the... Start Learning for Free
A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?
  • a)
    35
  • b)
    130
  • c)
    230
  • d)
    70
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
A two-dimensional array named Arr is with the range Arr[10........20, ...
CONCEPT:
If the questions ask for Row major Order, then use the formula will be Address of A[I][J] = B + W * ((I – LR) * N + (J – LC))  where N will be the number of columns.
Column major order concept: 
  • Column major order means the element in a column is stored adjacent to each other. This basically works in a 2d and 3d array.
  • Now we are given the base address along with the size of each element and the construction of a 2d array(row and column number )
  • First, we have to calculate the no. of rows here = (Row upper limit - Row lower limit) + 1 = (20 - 10) + 1 = 11.
  • We need no. of the column if the ques will ask about Row major order.
  • There is a formula available to calculate it directly(Rather than going into deep how the formula came, it's better to remember the formula.)
FORMULA:-
Address of A[I][J] is can be calculated with the formula is A[I][J] = B + ((J – LC) * M + (I – LR))*W.
where;
  • I- Row subset of an element whose address is to be found ( 15 here)
  • J = Column Subset of an element whose address is to be found,(30 here)
  • B- Base address(10 here)
  • W- storage size of one element  (2 bytes here)
  • LR- the lower limit of row (u can take start index of the matrix)- (10 in this ques)
  • LC-Lower limit of column(start column index of the matrix) - (25 in this ques)
  • M- number of rows given in the matrix. (11 here)
 Now solve the equation by solving the inner bracket first.
10+[5*11+5] *2  = 10+(60)*2 = 10+120 = 130 will be the answer.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer?
Question Description
A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer?.
Solutions for A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer?, a detailed solution for A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A two-dimensional array named Arr is with the range Arr[10........20, 25......45]. The base address of the array is 10 and the size of each element is 2 bytes. What will be the location of Arr[15][30] using column major order?a)35b)130c)230d)70Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev