if the address of a[1,1] and a[2,1] are 1000 and 1010
respectively and each occupies 2 bytes then the array has
been stored in what order?

Answers were Sorted based on User's Feedback



if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then ..

Answer / ....................

it's order is a[5,5] because it takes 2 bytes for every
elements i.e a[1,1]=1000 a[1,2]=1002 a[1,3]=1004
a[1,4]=1006 a[1,5]=1008 a[2,1]=1010..............

Is This Answer Correct ?    49 Yes 8 No

if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then ..

Answer / parul_kul

The order of array cannot be defined as we dont know the
max size of the array. however we can calculate the column
subscript of the array as follows-
a[1,1] = 1000, a[1,2] = 1002, a[1,3] = 1004, a[1,4] =
1006, a[1,5] = 1008.
After this the 2nd row will start as a[2,1] = 1010, and so
on.
So we can define the no. of columns, i.e. 5, in this array
but not the no. of rows.

Is This Answer Correct ?    14 Yes 2 No

if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then ..

Answer / vignesh1988i

always the 2D array will be stored in column order only , in
C.... so only ,
it is a must that we must specify the column subscript
however we miss the row subscript.....

thank u

Is This Answer Correct ?    7 Yes 4 No

if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then ..

Answer / kowshik

the array has been stored in row-major order.

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More C Interview Questions

What is a spanning Tree?

1 Answers   TCS,


What does sizeof int return?

0 Answers  


Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table

3 Answers   Value Labs,


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

0 Answers   Huawei,


How to find the given no is odd or even without checking of any condition and loops. (Hint: Using array)

4 Answers  






What do you understand by friend-functions? How are they used?

0 Answers   iNautix,


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

0 Answers  


how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......

10 Answers   Infosys,


What is page thrashing?

0 Answers  


write a program to print infinte number

4 Answers  


write a program to generate 1st n fibonacci prime number

2 Answers  


Why is main function so important?

0 Answers  


Categories