Ritesh raushan wrote:Why array index start with zero in c,cpp,java but in cobol,fortron start with index 1.....please help me this my interview question and i did'nt get select..
Quite frankly. I would have challenged back -- as the answer to why, for all those languages, can only lowest common denominator to "because that is how it is designed". Even the article presented, which I don't completely agree with, doesn't explain why fortran starts with one.
And of course, a plug for one of my favorite languages, Pascal -- in that language, you specify the range, so you can have it start with zero, one, or anything, that matches your algorithm.