Meaning: Array start at 1 ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.

9th Mar 2018, 11:55 AM
Ferry Fernando
Ferry Fernando - avatar
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.
9th Mar 2018, 12:24 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 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
9th Mar 2018, 12:49 PM
Harsh
Harsh - avatar
+ 2
Please show the meme. Without that nothing can be said! And yes , your question is off topic
9th Mar 2018, 11:59 AM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 2
I'm pretty sure it is a meme because array indexes start at 0.
9th Mar 2018, 12:20 PM
Dread
Dread - avatar
+ 2
You may define a map and make the first key as one...
9th Mar 2018, 12:42 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
10th Mar 2018, 9:01 AM
Ferry Fernando
Ferry Fernando - avatar
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/
10th Mar 2018, 8:59 AM
Ferry Fernando
Ferry Fernando - avatar