+ 2
Meaning: Array start at 1 ?
what does "array start at 1" meme mean? I dont get it. Sorry if I out of the topic.
7 Answers
+ 15
In most of the programming languages, arrays start at 0. It's a common (very very very common actually) mistake by the beginners to count the index from 1. It happened to me so many times that my codes didn't work because I counted the index from 1 instead of 0. There are many memes based on this and I can relate pretty well. I saw this one:
A boy tells himself "every creature is precious" and tries to save an ant. Then the ant tells him "arrays start at 1". The programmer boy gets angry and kills that ant :P
P.S.: There are some exceptions too, like in MATLAB, R etc. arrays start at 1.
+ 9
I had the same confusion when I was learning about arrays, check out this link, it has various detailed answers.
https://www.quora.com/Why-does-array-indexing-start-from-0
+ 2
Please show the meme. Without that nothing can be said!
And yes , your question is off topic
+ 2
I'm pretty sure it is a meme because array indexes start at 0.
+ 2
You may define a map and make the first key as one...
0
thank you for all the answer.
so, as far I see, all the meme about "array start at 1" will make someone mad or frustrated.
I dont know why or its relate.
is it because who is "force" their code to array start at 1 make other "hurt/mad" because the very common or "most standart" is array start at 0.
that is my thought or opinion.
so, that is why I question this. why in the meme it's look like people going mad when somebody say "array start at 1"
https://www.reddit.com/r/ProgrammerHumor/comments/6jea7z/array_indexing_round_2/