why array index always starts from zero??

Answer Posted / supercool

It uses the concept of Binary digits. Take an array size of 64 for example. We start from 0 and end at 63,
We require 6 bits.But, if we were to start from 1 and end at 64, we would require 7 bits to store the same number,
thus increasing the storage size.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

783


Can true be a variable name in c?

741


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

910


What is the use of linkage in c language?

816


Why is extern used in c?

827


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

794


How would you rename a function in C?

805


Explain a file operation in C with an example.

882


What is the use of pragma in embedded c?

780


c program to compute AREA under integral

2072


What are run-time errors?

809


What is a stream water?

890


What is pointer to pointer in c with example?

743


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

872


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

902