Why Arrays Are Zero Indexed

Why Arrays Are Zero Indexed

Jamie King

10 лет назад

13,859 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@hroman_codes
@hroman_codes - 07.02.2023 20:41

Thank you this was great!

Ответить
@fatihboyar9697
@fatihboyar9697 - 13.08.2022 21:31

thank you alot

Ответить
@mferreira1231
@mferreira1231 - 06.12.2020 17:20

I don't usually comment, but this is absolutely mindblowing, I've never realized this. Thank you Jamie!

Ответить
@davidhorton1109
@davidhorton1109 - 31.05.2020 11:20

As usual - a very good explanation of the chosen topic. Could somebody help me figure out how to view Assembly code? I'm using M/S Visual Studio.

Ответить
@giggleghost3751
@giggleghost3751 - 24.10.2019 12:35

If I go: "One, two, three...", I've also started counting from zero. Saying "one" means I've counted everything between 0 and 1. And the index (start) of number one is 0. In other words, computers count numbers the same way humans count numbers. It's just that computers don't get confused like we do. xD

Ответить
@jsonkody
@jsonkody - 09.09.2019 02:50

No its not easier its dumb. And I am not beginer I know what I am talking about, but typing on phone so Ill elaborate maybe next time. As homework try compare slicing of arrays in python and then in julia.

Ответить
@omkarposhatwar5190
@omkarposhatwar5190 - 16.01.2019 23:41

Sadly (AllProgrammers - 42K) are living under a rock just like I was until a few days ago.

Ответить
@fazlyrabby
@fazlyrabby - 20.12.2018 19:49

how many language i need to learn in order to become a good programmer what you thinks ??!

Ответить
@fazlyrabby
@fazlyrabby - 20.12.2018 19:41

do you have any java programming tutorial videos

Ответить
@ninjaguysvideos
@ninjaguysvideos - 04.05.2018 21:21

Great vid my man

Ответить
@NehemiahJacobCoder
@NehemiahJacobCoder - 02.02.2018 00:53

I get this pointer arithmetic challenge. All Dennis Ritchie should have done is, to abstract this issue and wrote that 'off-one' logic under compile time while generating machine code. So to answer the question why arrays are zero indexed, it is so because C had it so, then C++, Java, Python and popular language adapted that.

But we know arrays can be also 1 based as in Matlab, Lua, Julia, Ring languages.

Ответить
@notker88
@notker88 - 25.05.2017 20:31

nice video

Ответить
@ScriptGuider
@ScriptGuider - 01.08.2016 15:05

Very informative video.

Ответить
@alinear1310
@alinear1310 - 12.07.2016 03:02

Thank you, I was totally wrong about the zero index, you're the best.

Ответить
@michaeljacobson5736
@michaeljacobson5736 - 08.05.2016 08:08

Thank you! You got me hyped about C#. Before you, I was only really hyped about JavaScript.

Ответить
@BenjaminAdebowale
@BenjaminAdebowale - 21.03.2016 01:19

Subscribed!! Dude you're so knowledgeable. If you don't mind be asking, what exactly did you study? I'm just so curious :)

Ответить
@arshakkroyan2899
@arshakkroyan2899 - 09.02.2016 22:56

Thank you very much. I want to say more but let me simply say BIG THANK YOU.

Ответить
@KamilIbadov
@KamilIbadov - 31.12.2015 12:28

Great!Thanks

Ответить
@priyankkharat7407
@priyankkharat7407 - 14.10.2014 19:50

Very Helpfull video sir ....thank u :D

Ответить
@mohanhegde
@mohanhegde - 16.04.2014 20:58

Sir, you are the most cool, casual, fun, funny, practical and informative teacher I've ever met when it comes to programming... your style of teaching is just awesome!!

Not only do you explain things in a casual and fun style for C#(I've only just seen C# for now, hoping to check out C++, SQL,  and the other playlists some day) code and topics, but you also show us what goes on behind the scenes like the compiler's interpretation and syntactic sugar, MSIL, and even down right to the Assembly code and Registry and memory addresses etc..

If "Elvis Presley" is the "King of Rock 'N' Roll", you sir are the "King of Code" (not able to come up of a better name right now :P ) because, not only do you do something, you do it with style :)

Can't thank you enough sir for making programming not only easier to understand but also fun at the same time...hope to continue seeing more videos in the future.. Thanks a lot, you rock!! :)

Ответить
@shrankhalasharma6794
@shrankhalasharma6794 - 23.12.2013 18:50

Thanks for so many excellent tutorials, just wondering which paint tool you are using in the tutorial, can you please tell me the name of that tool ?

Ответить
@Grimlock1979
@Grimlock1979 - 29.11.2013 13:14

Starting from 0 also makes a lot more sense mathematically.
If, for example you divide numbers by 3:
0/3=0, 1/3=0, 2/3=0, 3/3=1, 4/3=1, 5/3=1, etc you'll get groups of 3 : 0,0,0,1,1,1,2,2,2,...
Same with modulo:
0%3=0, 1%3=1, 2%3=2, 3%3=0, 4%3=1, 5%3=2, etc.
0,1,2,0,1,2,0,1,2...

Ответить
@SSBBrawler
@SSBBrawler - 06.11.2013 15:50

Thanks for the explanation! An array starting at 0 was always something that bugged me in my previous classes. Now it makes sense why it does that.

Ответить
@32dom32
@32dom32 - 05.11.2013 22:18

This was very interesting! thanks

Ответить
@JamieKingCS
@JamieKingCS - 05.11.2013 17:51

Hehe, share the channel with your tech friends, Facebook, etc. Thanks for the kind words.

Ответить
@hatezbaszaras
@hatezbaszaras - 05.11.2013 17:48

Well now you have propably 3 views on this. I was all of them:D This is some real treasure here, along with your whole channel. Thank you for your great lectures! Can't believe you haven't got more publicity.

Ответить