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

Can we change the value of #define in c?

0 Answers  


Code for calculating square root without using library function, of math.h

4 Answers   IBM,


int x=sizeof(!5.856); What will value of variable x?

2 Answers  


Write a program to print distinct words in an input along with their count in input in decreasing order of their count..

1 Answers  


what will be the output of "printf("%d%d",scanf("%d% d",&a,&b))".provide an explation regarding the question

6 Answers  






how should functions be apportioned among source files?

0 Answers  


What is a spanning Tree?

1 Answers   TCS,


If I have a char * variable pointing to the name of a function ..

0 Answers  


Convert the following expression to postfix and prefix X $ Y Z - M + N + P / Q / (R + S)

2 Answers  


int i=0,j; j=++i + ++i ++i; printf(" %d",j);

2 Answers   ME,


consagous technology placement paper

3 Answers   Consagous, Sypra,


What are the two types of functions in c?

0 Answers  


Categories