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
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 |
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 |
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 |
how the compiler treats any volatile variable?Explain with example.
What is extern keyword in c?
What are 'near' and 'far' pointers?
#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }
what is the difference b/w NULL and null?
c program to arrange digits in a no in ascending and descending order
What are the 32 keywords in c?
What is the most efficient way to store flag values?
value = 0xabcd; for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) { foo(); if (loop & 1) value >>= 1; } how many times is foo() executed?
write a program to display the numbers in the following 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4
what is level of tree if leaf node is at level 4.please explain.
what is the difference between normal variables and pointer variables..............
15 Answers HP, Infosys, Satyam, Vivekanand Education Society,