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

Explain About fork()?

644


Tell us the use of fflush() function in c language?

635


What is the importance of c in your views?

586


What are preprocessor directives?

668


Explain is it valid to address one element beyond the end of an array?

729






What is extern keyword in c?

639


How to write c functions that modify head pointer of a linked list?

539


What is dynamic dispatch in c++?

554


What are data types in c language?

578


Should a function contain a return statement if it does not return a value?

592


How do you convert strings to numbers in C?

705


Differentiate between the expression “++a” and “a++”?

697


define string ?

664


What is the difference between scanf and fscanf?

660


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1624