why array index always strats wuth zero?
Answers were Sorted based on User's Feedback
Answer / sameer
it because arrays index are pointers and you are giving
offsets from the base pointer & base pointer is starting
element address so it has offset zero from base pointer
Is This Answer Correct ? | 11 Yes | 3 No |
Answer / surya.raj
Since I found this questions answer on a another website and
I can do copy and paste from there, but in order to make
copyright and royalty of original poster I am not tending to
do that so, here is the link below from where you can get
answer of your question.
http://developeronline.blogspot.com/2008/04/why-array-index-should-start-from-0.html
Is This Answer Correct ? | 2 Yes | 0 No |
write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
Is the following code legal? typedef struct a { int x; aType *b; }aType
Write a routine to implement the polymarker function
write a c program to print magic square of order n when n>3 and n is odd?
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
Write a program to model an exploding firecracker in the xy plane using a particle system
What are the files which are automatically opened when a C file is executed?
Write a program that reads a dynamic array of 40 integers and displays only even integers
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above