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 the preprocessor categories?

1114


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

1188


Is c language still used?

1045


What is the difference between array and pointer?

1083


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

3394


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1154


How can you access memory located at a certain address?

1162


When should a type cast not be used?

1108


What are the scope of static variables?

1252


What are the back slash character constants or escape sequence charactersavailable in c?

1229


Define the scope of static variables.

1197


What are the advantage of c language?

1105


code for find determinent of amatrix

2013


Explain what are binary trees?

1128


What is #pragma statements?

1157