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

explain how do you use macro?

0 Answers  


How can you tell whether a program was compiled using c versus c++?

0 Answers  


Which built-in library function can be used to match a patter from the string?

0 Answers  


int i=~0; uint j=(uint)i; j++; printf(“%d”,j);

1 Answers  


How will you delete a node in DLL?

0 Answers   GrapeCity,






what is a headerfile?and what will be a program without it explain nan example?

6 Answers   Assurgent,


what is the use of operator ^ in C ? and how it works?

2 Answers  


Sir,please help me out with the output of this programme:- #include<stdio.h> #include<conio.h> void main() { int a=18,b=12,i; for(i=a<b?a:b;a%i||b%i;i--); printf("%d %d",i); }

4 Answers  


What is a rvalue?

0 Answers   Global Logic,


Why does everyone say not to use gets?

0 Answers  


What is Dynamic Initialization.

3 Answers  


can any one tel me wt is the question pattern for NIC exam

0 Answers   NIC,


Categories