57

Arrays start at what?!

Comments
  • 2
    I actually never understood why they have to start at 0, it is very confusing at first.
  • 4
    @AdrianD Well, it's basically a practice from languages without any memory management capabilities. For example, in languages like C and C++ where you'll have to allocate and deallocate memory, it's easier when you start the first element at the same location where the array is allocated. Honestly, it doesn't matter where you start the array. But if you don't start it at Zero, you're just an anarchist trying to start a civil war within your team 😂😂
Add Comment