GATE CSE
First time here? Checkout the FAQ!
x
+5 votes
126 views

Please explain how to solve this.

asked in DS by Boss (6.9k points) 5 31 85 | 126 views

2 Answers

+4 votes
Best answer

Correct me if i am wrong

answered by Active (1.3k points) 15 37
selected by
Thanx nicely explained..:)
If the question was for column major then what will be the address.....???

I got 1046.....is it right...??
+1 vote

If we take the size of each element as 1 bytes. 

Then its actually asking for the address of A[4][2] in the lower triangular matrix.

In Row Major Order, A[i][j] = Base + Size( (i - lower1) *NNS + (j-lower2) )     //NNS = Natural No.Sum.

So, A[4][2] = 1000 + 1 ( ( 4-(-6) )*NNS + (2-(-6) ) )

                  = 1000 + (1+2+3+4+5+6+7+8+9+10) + 8

                  = 1000 + 55 + 8

                  = 1063

answered by Junior (725 points) 3 9

Related questions

+1 vote
0 answers
1
asked in DS by Arnabi Boss (6.9k points) 5 31 85 | 107 views
0 votes
1 answer
2


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23398 Points

  2. Bikram

    17078 Points

  3. Habibkhan

    8280 Points

  4. srestha

    6300 Points

  5. Debashish Deka

    5438 Points

  6. jothee

    4978 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4348 Points

  9. sushmita

    3970 Points

  10. Rishi yadav

    3804 Points


Recent Badges

Commentator Shivam Chauhan
Notable Question set2018
Nice Comment srestha
Notable Question set2018
Regular Shankar Jha
Popular Question Shubhanshu
Good Comment mcjoshi
Notable Question antarachoudhury
Popular Question shweta12345
Good Comment Rohan Mundhey
27,325 questions
35,176 answers
84,120 comments
33,280 users