Why array starts with index 0

Answers were Sorted based on User's Feedback



Why array starts with index 0..

Answer / saurabh upman

Index is used as an offset value.Giving value 0 to the starting address means that we are 0 element far from the destination in a contigious memory arrangment.It makes the indexing a coherent offset to be assigned.

Is This Answer Correct ?    0 Yes 0 No

Why array starts with index 0..

Answer / gopesh dubey

Because the name of array is a pointer

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

2 Answers   CMC, Wipro,


Implement bit Array in C.

0 Answers   GrapeCity,


Are the expressions * ptr ++ and ++ * ptr same?

0 Answers  


Do you have any idea about the use of "auto" keyword?

0 Answers  


If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.

12 Answers   Google,






How to avoid buffer overflow?

1 Answers  


What is indirect recursion? give an example?

4 Answers  


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

0 Answers   HCL,


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

0 Answers  


differnce between do and do while

3 Answers   DOEACC,


What are the 5 organizational structures?

0 Answers  


Which of the following is not a valid declaration for main ()? 1) int main() 2) int main(int argc, char *argv[]) 3) They both work

2 Answers  


Categories