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 we are using semicolon at the end of printh statment

2 Answers   HCL,


Why does not use getgh(); and <conio.h> in c language.

3 Answers   Elofic,


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

0 Answers   ADP,


what is the different bitween abap and abap-hr?

0 Answers   TCS,


write a program to print the all 4digits numbers & whose squares must me even numbers?

2 Answers   Virtusa,


#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?

4 Answers   Ramco,


What is meant by type casting?

0 Answers  


What do you understand by normalization of pointers?

0 Answers  


What is #ifdef ? What is its application?

0 Answers   TCS,


What does a pointer variable always consist of?

0 Answers  


Describe the difference between = and == symbols in c programming?

0 Answers  


Write a c program using for loop to print typical pattern if number of rows is entered by keyboard. ABCBA AB BA A A

1 Answers  


Categories