Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ac123511438yx[3] doesn't mean take the 3rd apple.
x[3] means skip 3 apples and then take one.
x[0] means skip 0 apples and then take one. -
I was gonna make the comment about it being the 4thh apple... :( but it seems repetitive now
-
Damn it guys...
I wanted to nitpick him on array indexes first!
And I asked for oranges damn it! ORANGES!
Can't our front end guy get it right? -
Jifuna37308y@ac1235 wow, didnt know that. Wtf always thought that you simply start counting from zero.
-
ac123511438y@Jifuna it is a valid way to think about it, but when you look how it is implemented in C:
X is the (pointer to the) first apple
so is X[0]=X+0
But when we skip the first: X[1] = X+1 we get the second apple. and so on
Cause for us counting starts with 0. (in most of programming languages)
undefined