Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


why array index always starts from zero??

Answers were Sorted based on User's Feedback



why array index always starts from zero??..

Answer / 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

why array index always starts from zero??..

Answer / guest

array's start from 0

Is This Answer Correct ?    6 Yes 7 No

why array index always starts from zero??..

Answer / bijayalaxmi behera.

The index of an array is an OFFSET from the beginning of the
array, multiplied by the width of the array items:
Say an array of integers, 4 bytes long.
Say beginning of array at address 0x1000
First integer address: BaseAddress + (index * len) = 0x1000
+ ( 0 * 4) = 0x1000
Second integer will be at : 0x1000 + ( 1 * 4 ) = 0x1004.

Is This Answer Correct ?    4 Yes 6 No

why array index always starts from zero??..

Answer / nobody special

because starting from 3 would just be silly?

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More C Interview Questions

Why c is a mother language?

0 Answers  


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

0 Answers  


matrix multiplication fails introspect the causes for its failure and write down the possible reasons for its failurein c language.

5 Answers   TCS,


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

0 Answers  


There are 3 baskets of fruits with worng lables,one basket has apple,another basket has orange,another has combination of apple and orange,what is the least way of interchange the lables.

15 Answers   Cisco, Google, MBT,


What is ponter?

0 Answers   TCS,


What is table lookup in c?

0 Answers  


What are Macros? What are its advantages and disadvantages?

0 Answers   TCS,


please give me answer with details #include<stdio.h> main() { int i=1; i=(++i)*(++i)*(++i); printf("%d",i); getch(); }

3 Answers  


Find the middle node in the linked list?? (Note:Do not use for loop, count and count/2)

6 Answers   Subex,


What is the size of structure pointer in c?

0 Answers  


what does static variable mean?

0 Answers   TCS,


Categories