why array index always starts from zero??
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / nobody special
because starting from 3 would just be silly?
| Is This Answer Correct ? | 1 Yes | 9 No |
writ a program to compare using strcmp VIVA and viva with its output.
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
0 Answers College School Exams Tests,
write a program to display reverse of a number using for loop?
write a proram to reverse the string using switch case?
Is it possible to create recycle bin in mobiles?
What is string constants?
What extern c means?
What are identifiers and keywords in c?
What are variables c?
WAP to find that given no is small or capital
When should a type cast not be used?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit