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??

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pointers? What are different types of pointers?

1058


Tell me what is null pointer in c?

1012


Explain indirection?

1063


the question is that what you have been doing all these periods (one year gap)

2017


Where define directive used?

1031


How many data structures are there in c?

1064


Why c is called object oriented language?

1007


What is the equivalent code of the following statement in WHILE LOOP format?

1248


Can you write the algorithm for Queue?

2029


What does static variable mean in c?

1060


what is the syallabus of computer science students in group- 1?

2264


What does main () mean in c?

1058


How variables are declared in c?

993


What is static and auto variables in c?

1020


Is c is a low level language?

1067