Why array starts with index 0
Answers were Sorted based on User's Feedback
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 |
Please provide question papers of NATIONAL INFORMATICS CENTRE for Scientific officer
What is difference between %d and %i in c?
Explain what is output redirection?
Why do we need functions in c?
program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
what is the structure?
find the output of the following program main() { int x=5, *p; p=&x; printf("%d",++*p); }
what is array?
sum of two integers values only other then integer it should print invalid input.
Where static variables are stored in memory in c?
What is the 'named constructor idiom'?
How do you override a defined macro?