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

write a program in c to find out the sum of digits of a number.but here is a condition that compiler sums the value from left to right....not right to left..

1 Answers  


When should you use a type cast?

0 Answers  


without using arithmatic operator solve which number is greater??????????

1 Answers   Accenture,


What is the value of h?

0 Answers  


what are brk, sbrk?

1 Answers   Oracle,






What does typeof return in c?

0 Answers  


in linking some of os executables are linking name some of them

0 Answers   IBM,


What is multidimensional arrays

0 Answers  


How can I call a function, given its name as a string?

4 Answers   ABC Telecom,


What is scanf_s in c?

0 Answers  


what does ‘#include’ mean?

1 Answers   TCS,


Write a program to enter the name and age. If age>28 then find salary categories. if age<28 then find that you are gaduate or not.

1 Answers  


Categories