CS50 2019 - Lecture 2 - Arrays

Поделиться
HTML-код
  • Опубликовано: 6 фев 2025

Комментарии • 329

  • @kickbuttowsk2i
    @kickbuttowsk2i 5 лет назад +1033

    is there an Oscar for teaching? please, give to this guy.

    • @balarabeibrahim9139
      @balarabeibrahim9139 5 лет назад +19

      He deserves even better

    • @davidjmalan
      @davidjmalan 5 лет назад +195

      Ha, thanks for the kind thought!

    • @aymanayman9000
      @aymanayman9000 5 лет назад +2

      @@davidjmalan could you make lectures about assembly you are such a great teacher

    • @rubeniaborge4652
      @rubeniaborge4652 5 лет назад +2

      @@davidjmalan Yes, Dr. Malan, you are a pretty awesome Professor! :)

    • @davidjmalan
      @davidjmalan 5 лет назад +17

      @@rubeniaborge4652 Thank you!

  • @shameeralam8707
    @shameeralam8707 4 года назад +222

    David Malan is the first and probably the only person I have found on you tube whose speed I cannot dare to increase. This guy is an incredible speaker.

    • @anothernik
      @anothernik 4 года назад +5

      Completely agree about David being incredible, but uh... speeding up John Green? (Specifically CC History) :)

    • @meowmeow646
      @meowmeow646 4 года назад +7

      but I'm listening at 1.5x lmao

    • @anothernik
      @anothernik 4 года назад

      Hard to listen at anything but 1x once you get to week 4 or 5 👀

    • @apragobrr
      @apragobrr 4 года назад +6

      Im legit playing this vid on x1.75 speed 😂

    • @ermyril
      @ermyril 4 года назад

      check out Ben Shapiro videos :D

  • @aconfusedalien1491
    @aconfusedalien1491 5 лет назад +348

    You know its about to get real difficult when they spend the first half of the lecture showung you all the different ways you can get help...

    • @alexthotse5487
      @alexthotse5487 5 лет назад +4

      @cmartinez1089 That's how great foundation is created, by knowing the why, how and where.

    • @doc-holliday-
      @doc-holliday- 4 года назад +25

      It's like playing a game and suddenly there are health potions all over the place. Shits about to get real lol

    • @PrevalentAA
      @PrevalentAA 4 года назад +3

      @@doc-holliday- lol best comment

    • @Qwertyuiop0109
      @Qwertyuiop0109 4 года назад +2

      @@doc-holliday- A good comparison, I must say. haha.

  • @Factory400
    @Factory400 5 лет назад +200

    If this guy was my teacher in the late 80's when I started programming - I would be a billionaire by now. I had to slog through paper books.
    This CS50 resource is more valuable than actual gold.
    For anyone wondering, C is a relevant language in 2019. I use it every day to accomplish things that Python cannot touch.

    • @lychenus
      @lychenus 5 лет назад +15

      shed me light what python cannot do but c does please?

    • @alexthotse5487
      @alexthotse5487 5 лет назад +9

      @Factory400 care to elaborate? Cause Python has cornered almost every discipline in CS, from Data Science to Web Development. Maybe you could shed some light on this marvellous language.

    • @ThatThing1675
      @ThatThing1675 5 лет назад +22

      @@alexthotse5487 Probably efficient memory manipulation, and embedded electronic systems

    • @fablesfables
      @fablesfables 5 лет назад +14

      @@ThatThing1675 as someone who worked in the embedded industry, you're absolutely right. its all C.

    • @f0restc
      @f0restc 5 лет назад +17

      @@alexthotse5487 Kernel programming, systems programming, memory management, or low level I/O (or hardware) manipulation. Python could probably achieve some of these tasks as well, but with a lot of hurdle (e.g. importing ad hoc modules, adjusting for lack of architecture support, and overcoming limitations of an interpreted language); You're absolutely right in the sense that Python has a lot of applications in CS, but C on the other hand is able to perform these tasks in a much more efficient manner.

  • @randomhuman8649
    @randomhuman8649 4 года назад +167

    I'm now realizing that I do not have to wait till I finish highschool to receive college-level education this is so cool

    • @hossamsaeed5310
      @hossamsaeed5310 4 года назад +21

      You are a nice random human

    • @dethras5749
      @dethras5749 4 года назад +5

      I'm in the equivalent to freshman grade but in the UK and this is giving me such a a great head-start on my GCSE's and hes been a much better teacher than my regular ones so i agree, this is so cool

    • @loyisongcobo7565
      @loyisongcobo7565 4 года назад

      same

    • @nilaksh007
      @nilaksh007 4 года назад

      I am playing 1.5x but I agree he speaks fast

    • @ionutth4895
      @ionutth4895 4 года назад +5

      I never managed to finish highschool (im 28) strill trying to finish , been doing programming and game development for 5 years now, and i finally found out i can get a bazillion courses online and certifications for stuff i know and im passionate about without having to waste 10 years and thousands of dollars and many hours in traffic to get educated.
      Also where i live the state-education is mostly fake so even if i take state education or not im still 0 so having access to such high quality education from an amazing teacher is heart warming, eye opening and ambition booster like nothing else. And in this pandemic is a godsend, after this pandemic is over hopefully we all come out more educated and better people.

  • @franktugume5364
    @franktugume5364 5 лет назад +117

    David your not only touching lives in the us even here in Africa we are getting alot of help from cs50 your the best teacher I will and have ever met.

    • @davidjmalan
      @davidjmalan 5 лет назад +32

      Thank you for the kind words, Frank. So very glad to hear!

    • @aymanayman9000
      @aymanayman9000 5 лет назад +4

      @@davidjmalan you are a great teacher could you make lectures about assembly

    • @nitinkumarparmar6354
      @nitinkumarparmar6354 4 года назад

      In india too

  • @ServetGulnaroglu
    @ServetGulnaroglu 5 лет назад +41

    19 years old and never seen such a cs lecture

  • @yateeshbhardwaj3706
    @yateeshbhardwaj3706 5 лет назад +40

    David
    We love you a lot. In India, it's a saying that to become wise, share your knowledge as much as you can. And you are doing the same work and achieving wisdom and love from the world.
    Thanks a lot Sir!

  • @marcellorusciano
    @marcellorusciano 4 года назад +33

    "But you know... I love you" 1:47:09
    I felt that

  • @techinfo7116
    @techinfo7116 4 года назад +197

    ANYONE WATCHING THIS DURING COVID 19 IT SO MUCH FUN TO DO CS50

  • @dani010203stor
    @dani010203stor 4 года назад +5

    it amazes me how colloquial he is. how well he explains and how well he express everything. specially being somehting that complex! i cannot tell you what i did yesterday afternoon that eloquently

  • @angelachan342
    @angelachan342 4 года назад +3

    Thank you David and CS50! You're the best teacher and this is the best class I've ever taken to learn computer science/programming/coding! I was afraid that without being in school where I can ask easily ask people for help I wouldn't be able to understand a subject as difficult as computer science on my own. But so far it's going so well, because you explain the subject in a way that makes it seem like it's so simple anyone can understand it.

  • @JOJOSHgaming7514
    @JOJOSHgaming7514 4 года назад +2

    The most brilliant lecturer I've always been dreamt to attend to. None of any lectures out there go in such excitement. Thank you very much, Harvard for providing us such golden materials for free.

  • @roydonk2878
    @roydonk2878 4 года назад +1

    As someone who learned to code through making web applications with JavaScript and small games with C#/Unity via online tutorials, this lecture series is definitely something I wish I had access to a lot sooner. It's filling in so many gaps in my knowledge. I can't believe it's for free on RUclips.

  • @rosemarie2661
    @rosemarie2661 4 года назад +2

    I enrolled in this course a few months ago and never thought id be able to get anywhere. admittedly it's taken me some time and I've had a lot of setbacks. I started it while I was trying to finish 10th grade online at the beginning of a pandemic. I struggled through even the first simple scratch program and the week 1 problem sets before realizing I was starting to retain the knowledge, make decisions in my mind about what was next. I started with 0 knowledge, I've always been more creatively minded, technology is not my strong suit. but I found myself interested and learning a language completely new to me. it's taken me a long time so far, but no matter what I can say I learned something and I'm proud of myself. now I am back in school 5 days a week but so excited to be starting this next step (I do not call them weeks because it takes me so long lol, I am working on it)

  • @IshpreetKaurSandhuJi
    @IshpreetKaurSandhuJi 4 года назад +1

    Its really so kind of him to be giving his lectures to anyone on the planet free of cost ! I! We need more such teachers! 👏👏

  • @Nistelrooyus
    @Nistelrooyus 4 года назад +1

    I never thought that somebody can teach you programming at that level that it looks like it is such an "easy and simple" subject. Thank you.

  • @PrevalentAA
    @PrevalentAA 4 года назад +3

    I'm so greatful for these lessons. Really helps driving some fundamental concepts home. Keep it up, the less fortunate really need these.

  • @mansusinghhh1532
    @mansusinghhh1532 4 года назад +24

    he can win an oscar in teaching! i mean just look the way of his explaining, the way of his communcication

  • @md.hafizsikder4152
    @md.hafizsikder4152 4 года назад

    Sir, I am learning a lot. But CS50's website does not have any previous questions to check how much I've learnt so far.
    I am getting addicted to your lectures. You are a great teacher. Thanks to Harvard for sharing this high quality teachers to us, who probably never have the ability to see them in person.

  • @Yokie05
    @Yokie05 4 года назад +1

    “They see this but you know, I love you”
    That legit made me smile hahaha

  • @xPanPan1130x_clips
    @xPanPan1130x_clips 4 года назад +33

    Aw I'm loving this!

  • @micahlindley
    @micahlindley 4 года назад +8

    53:11 "I'm now going to capitalize the variable, just because." - priceless.

  • @mirhat9330
    @mirhat9330 4 года назад +4

    i'm 15 years old and watching this course. This is a amazing resource. and the teacher is so good!

  • @zahidhossen3134
    @zahidhossen3134 5 лет назад +12

    I can't thank you enough Mr. David.

  • @gabriell.gabriel
    @gabriell.gabriel 4 года назад +12

    Let me go ahead and say that it was a great class!

  • @user-dc1kf3gp4t
    @user-dc1kf3gp4t 4 года назад +2

    watching this on valentines day 1:47:10

  • @3vgezer
    @3vgezer 4 года назад

    Oh the commintment. Such a commitment is like this too adorable. It is a joy to watch you and learn from you.

  • @yanis8161
    @yanis8161 4 года назад

    David malan has really a hilarious amount of talent at teaching because like u feel that everything Is easy to understand and he is never boring

  • @CrazyYashi
    @CrazyYashi 4 года назад

    you are the best teacher I have ever seen in my entire life!

  • @noelcovarrubias7490
    @noelcovarrubias7490 4 года назад +1

    I love this guy a lot! He is just the beast!!!!!!

  • @anonymous4768
    @anonymous4768 4 года назад +1

    david j malan u r the greatest teacher i have ever seen
    and i say i love you well unencryptically

  • @sakibahamed3705
    @sakibahamed3705 4 года назад

    Just love these lectures of cs50. Thanks a lot David. You are the best.

  • @deltoidx
    @deltoidx 5 лет назад +14

    Hey Dave, been watching a few lectures to feel ready for UNI next year. Great stuff.

  • @noli2761
    @noli2761 4 года назад +1

    1:04:14
    Thank you good person who asked this question because i was SO CONFUSED

  • @simeng
    @simeng 4 года назад

    It turns out these lectures and the teacher are absolutely awesome!

  • @jeckerzz
    @jeckerzz 4 года назад +2

    Been learning a lot, I will apply all these fundamentals at work. Thank you 👍
    Now i can proceed to PSET2 🙂
    🇵🇭

  • @chintuchaatmasalayt4771
    @chintuchaatmasalayt4771 4 года назад +6

    the intro is so satisfying btw

  • @kal5211
    @kal5211 5 лет назад +1

    This is more enjoyable than 2018's lecture. You've really dialed in these lectures - thank you!

    • @multimediaworld9537
      @multimediaworld9537 5 лет назад

      any idea where can I get notes of week 2?

    • @ahmedalgriany4063
      @ahmedalgriany4063 5 лет назад

      @@multimediaworld9537 cs50.harvard.edu/college/notes/2/

    • @multimediaworld9537
      @multimediaworld9537 5 лет назад +1

      @@ahmedalgriany4063 thank you very much... I couldn't find them and I started 2018 lectures because they were the latest ones..been great help...

    • @ahmedalgriany4063
      @ahmedalgriany4063 5 лет назад +1

      @@multimediaworld9537 no problem, glad to help at any time ^_^

  • @hydra1346
    @hydra1346 4 года назад +2

    best anime intro of all time

  • @codeWithBatta
    @codeWithBatta 5 лет назад +3

    i hope someone teaches dynamic programming the way this guy teaches.

  • @cptpeanut203
    @cptpeanut203 5 лет назад +5

    Thanks for providing us with lectures David!

  • @SurajVanVerma
    @SurajVanVerma 4 года назад +1

    I am in Tier III College, Thank you CS50! Feels like I am in Harvard.

  • @devgiri
    @devgiri 5 лет назад +2

    well I love you too David for such an amazing lecture

  • @aconfusedalien1491
    @aconfusedalien1491 5 лет назад +95

    oh god its getting difficult i can feel my brain frying

    • @lolitis01
      @lolitis01 4 года назад +1

      Lol same 😂

    • @capturedglance
      @capturedglance 4 года назад +6

      ya idk how everyone here is like GIVE HIM AN OSCAR FOR TEACHING i dont think a 5 year old could understand this

    • @CH3LS3A
      @CH3LS3A 4 года назад +12

      @@capturedglance I mean, it's not really for 5-year-olds.

    • @doc-holliday-
      @doc-holliday- 4 года назад +37

      @@capturedglance This is a Harvard course bud, of course a 5 year old shouldn't understand it. If you remember in the beginning of the course he explained how it will feel like drinking water from a fire hose?
      Everyone feels stupefied at some point at the sheer amount of things you need to take in. That's normal. There will be points when you want to rip your hair out or just sit there and think "how the fuck am I even supposed to begin doing this?" Take a step back, rewatch the lectures, rewatch the shorts, read the notes, read the programmers manual for C on their site and when all else fails, look at the forums and remember others have gone through the same issues as you. Look for ways they solved the problem. Make sure you understand the logic of why it works. That way you wont just solve your current problem you'll be able to understand it for the future and wont need help next time.
      It's still challenging as hell, but that just means its more rewarding when you succeed.

    • @llliiilll3624
      @llliiilll3624 4 года назад +4

      @@capturedglance This content is supposed to be covered in several weeks which is covered in about 2 hours. You're not supposed to get everything, just the ideas.

  • @pastuh
    @pastuh 5 лет назад +10

    Watch 09:45
    And watch: "Using Air Quotes wrong your entire life - Air Quotes"
    I cry now..

  • @sridevivr8648
    @sridevivr8648 4 года назад

    My teachers cannot beat this guy in their dreams

  • @satyavardhan1326
    @satyavardhan1326 4 года назад

    If you think that he is just teaching. You are wrong
    HE IS CREATING HISTORY.....

  • @ninaddongare6514
    @ninaddongare6514 4 года назад

    David for president!

  • @lovely-shrubbery8578
    @lovely-shrubbery8578 5 лет назад +1

    You're a legend David

  • @RealMusicalPleasure
    @RealMusicalPleasure 5 лет назад +25

    i love how he used "negative 42" as an error message. The anti answer

  • @michaelsuteja7218
    @michaelsuteja7218 4 года назад +2

    Wow this is a great lecture! I really learned a lot from it!

  • @NytronX
    @NytronX 5 лет назад +11

    Damn, watching this made me feel good about myself. I actually know all of this already.

    • @NytronX
      @NytronX 5 лет назад +1

      @cmartinez1089 Will do. Regarding credit cards, that is luhn's algorithm. I have experience with that from cracking Lowes coupon codes, lol. The last digit is a check digit.

    • @lliammcbean
      @lliammcbean 4 года назад +8

      @@NytronX why would you comment on this just to pump your own tires?

    • @NytronX
      @NytronX 4 года назад +14

      @@lliammcbean Part of CS is celebrating what you know and what you don't know. Embrace it!

    • @rahulmalik1083
      @rahulmalik1083 4 года назад +6

      Considering the fact the course is specifically made for people taking cs for the first time , i wouldn't feel too proud of knowing elementary cs .

  • @irsyadkharisma9955
    @irsyadkharisma9955 4 года назад

    I wish that you were my lecturer in basic programming back in the day when I was in the second semester

  • @MCZ70890
    @MCZ70890 4 года назад +1

    I was bothered when he put 2 spaces after “input:” 1:22:40 but then I realized he did it on purpose so the names lined up... Mind blown

  • @mdnadeemanwar
    @mdnadeemanwar 4 года назад

    David j Malan sir deserve oscar for teaching

  • @decodingari
    @decodingari 4 года назад

    Not the crown intro SJJSKSKSK

  • @pkrockin3923
    @pkrockin3923 3 года назад

    I prefer to watch this over the 2020 one.

  • @RebeccaYen
    @RebeccaYen 4 года назад +2

    1:20:06 names[0]="EMMA"; names[1]=" RODRIGO"; ......
    If they are stored back to back in the memory, what happens if names[0] gets reassigned to "EMILY" or even "EMMILIA" ?
    What happens to names[1] RODRIGO ?

    • @nikokotto8240
      @nikokotto8240 4 года назад

      They are not stored back to back in the memory. They are stored back to back in your array. Array is a sequence. Memory is not like a sequence. Look closely in a "string" section in the video. A teacher David said every string always has a nulloperator which is telling the computer where string must be ended. And also a teacher said that string can be as long as a computer memory allows. So in your case we haven't just EMMILIA in the memory, we have EMMILIA with a lot of cells of memory after that string. We just don't see them. But they are there. That's why when a teacher tried to print the element of 400 inside EMMA index of array (he have written array[0][400]) we delivered a line with "-3". Some strange number, right? So that means a computer memory doesn't work so aligned as we would have thought of it, some data is always there. It's a lot of data around your elements and memory just adressed to your specific elements when you needed. So in the memory after EMMILIA is not RODRIGO, RODRIGO is somewhere in the memory, but in your array they are precisely after each other as a sequence. In memory they are not.

  • @chaitanyabansal7964
    @chaitanyabansal7964 4 года назад

    Teaching gold man

  • @blaxbrian6877
    @blaxbrian6877 2 года назад

    incredible .....i love it

  • @mohdsabir990
    @mohdsabir990 5 лет назад +9

    Your black T-shirt make our future bright 👍👍

  • @JPCWhutwhut
    @JPCWhutwhut 5 лет назад +2

    that was an amazing lecture thank you

    • @davidjmalan
      @davidjmalan 5 лет назад +1

      Thanks for the kind words!

  • @Whatdisaypt1and2
    @Whatdisaypt1and2 4 года назад

    This dude knows a thing or 2.

  • @teenytinytoons
    @teenytinytoons 4 года назад

    i feel like to i need to rip a line of blow to keep up with this guy.

  • @makkah_life_
    @makkah_life_ 4 года назад

    Thank you very much from Saudi Arabia

  • @khaledhasan1612
    @khaledhasan1612 5 лет назад +1

    we love you too :P

  • @khandakerzoadpial453
    @khandakerzoadpial453 5 лет назад

    Love the way you teach & your black T Shirt as always David J. Malan Sir :)

  • @heetpatel9425
    @heetpatel9425 4 года назад

    22:32 When the compiler has paused; waht does that mean? Is the compiling process is paused, or the assembling, or the linking process. Or all of them are pauesd?
    Please, answer.

  • @CarlosHernandez-wb5hq
    @CarlosHernandez-wb5hq 4 года назад

    Bruh it was a big surprise when the camera showed the whole stage with the big duck on the left.

  • @datpham31415
    @datpham31415 5 лет назад +4

    array 36:50 hope you love it ! =)

  • @timefeatherstorm
    @timefeatherstorm 4 года назад +4

    when i watch this in fast forward I feel like it is making him sweat talking that fast

  • @ivailotenevv
    @ivailotenevv 5 лет назад

    Awesome course

  • @RysanMart
    @RysanMart 4 года назад

    Amazing work, thank you :)

    • @davidjmalan
      @davidjmalan 4 года назад +1

      Glad you've joined us!

  • @alvincousins1726
    @alvincousins1726 4 года назад +1

    1:10:50 Ah the age old question: How long is a piece of string?

  • @aadil4236
    @aadil4236 5 лет назад +25

    Doesn't the intro sounds like intro from Crown (a Netflix show)

    • @davidjmalan
      @davidjmalan 5 лет назад +25

      That was the inspiration, in fact!

    • @aadil4236
      @aadil4236 5 лет назад +1

      Haha... great lecture btw, i learned a lot.

    • @davidjmalan
      @davidjmalan 5 лет назад +5

      @@aadil4236 Thanks!

    • @reiter2148
      @reiter2148 4 года назад

      @@beggar1415 yes, every single character takes some memory. That is how it is stored.

  • @RodrigoSantos-op6hk
    @RodrigoSantos-op6hk 4 года назад

    27:28 Guys the transition thou, teaching cs and acting like a robot

  • @linuxier1986
    @linuxier1986 5 лет назад +1

    Thanks for that video.

    • @davidjmalan
      @davidjmalan 5 лет назад +1

      You're welcome!

    • @aymanayman9000
      @aymanayman9000 5 лет назад

      @@davidjmalan could you make lectures about assembly and make algorithms course

  • @laur-unstagenameactuallyca1587
    @laur-unstagenameactuallyca1587 4 года назад

    dw I understand now lol :)
    -I'm so confused as to why n was stored in an array at --54:56--. And why the array in the loop has the same name (scores). Arrays are really confusing, like more confusing than variables. You can't name two different variables the same name or they'll overlap so what gives here? Why is that allowed in arrays? That's so confusing. And n isn't multiple values (just one) so couldn't you just keep it stored in an ordinary integer instead of also creating an array for it? Whut...-

  • @shayansaeed2765
    @shayansaeed2765 4 года назад

    I am 11 years and from my idea This man (David) is the best instructor of computer science in the history of the world (*well as far as I know*)

  • @dani010203stor
    @dani010203stor 4 года назад

    1:23:54 he said /n (blacklash, but i don't know how to type it) represent 1 character so it goes with single quotes. but there at the bottom of the formula its between double quotes 🤔

  • @govardhangowda527
    @govardhangowda527 4 года назад

    I wish he would be my teacher since from my childhood

  • @laur-unstagenameactuallyca1587
    @laur-unstagenameactuallyca1587 4 года назад +1

    I'm so close to finishing this lecture. 20 mins left. home stretch. It always gets harder and more complex to understand the closer you get to the end loool

    • @davidjmalan
      @davidjmalan 4 года назад

      Hang in there!

    • @laur-unstagenameactuallyca1587
      @laur-unstagenameactuallyca1587 4 года назад

      @@davidjmalan hi david it's been a few days and I'm happy to say I finished it and understand it but 1:38:21 and onwards is interesting. I get it intuitively but I never knew you could use a variable/array and only declare it beforehand in a function parameter list (like main's) and I never knew argc would be able to discern the parameters (in the non-coding sense of the word) of an argument to only be a word (so I guess what I mean is: counting an inputted string, but after a space character treating the next input as a separate word, putting different words inputted into the CLI into different indexes in the array, etc).

    • @beypazariofficial
      @beypazariofficial 3 года назад

      @@davidjmalan hey man love your lectures you have skills

  • @mabeldeensie4132
    @mabeldeensie4132 4 года назад

    Thank you

  • @shaswatsingh
    @shaswatsingh 5 лет назад

    Best 22:21 from

  • @DaroEP
    @DaroEP 4 года назад

    Incredible how you teach. It's a pleasure.
    Last week lecture 1 functions were explained?
    Cheers from Argentina.

    • @davidjmalan
      @davidjmalan 4 года назад +1

      Thank you! And, yes, in Week 1!

    • @DaroEP
      @DaroEP 4 года назад

      @@davidjmalan David I found it. The video explaining functions is in WEEK 2, SHORTS. Saludos!

  • @troytalbot5746
    @troytalbot5746 4 года назад +2

    Only thing I'm confused about...length is defined as an integer for a function, and then used inside the for function, how does the computer know what the value of length is, though?

    • @Alziax
      @Alziax 4 года назад

      I'm wondering the same thing, did you ever figure out how that logic works?

    • @Alziax
      @Alziax 4 года назад +1

      I found an explanation:
      'look where the original function is called in the print f line
      the function is taking two arguments, n and scores
      it looks at what their values are, and then copies their values into an integer called length and an array of ints called "array"'

    • @troytalbot5746
      @troytalbot5746 4 года назад

      @@Alziax I eventually got the program working as intended: but have stepped into another summer class. Haven't looked at it in a bit. Good job, though!

  • @tedtula8318
    @tedtula8318 4 года назад

    This would've been super helpful for week 1's problem sets...

  • @dani010203stor
    @dani010203stor 4 года назад

    1:12:15 i didn't get anything... 8 bits as zeros? what does it mean? were did the eight came from?

    • @RebeccaYen
      @RebeccaYen 4 года назад

      The size of Char data type is 8 bits (1 byte),
      \0 ( null byte ) : 8 bits as zeros is to mark the end of the string.
      C does not store any internal information about the length of the character array (or string) , and so the null character '\0' marks where it ends.

  • @aryansamsukha5220
    @aryansamsukha5220 4 года назад +1

    i had a question if clang has to link with the file cs50 then why dont we had to link it with stdio.h file

  • @theblackantonio
    @theblackantonio 4 года назад

    I know that big duck as "The Alestorm duck" 😂

  • @laur-unstagenameactuallyca1587
    @laur-unstagenameactuallyca1587 4 года назад +1

    1:31:26 HUH?! it's that easy? I assumed you'd have to cast it into an integer, then cast it back into a character to get the uppercase equivalent

  • @rishigulimi7583
    @rishigulimi7583 4 года назад +1

    can anyone tell where is arrays pls tell me so that i can learn from this i dont where is arrays

  • @ricardovicentini
    @ricardovicentini 4 года назад

    Why I cannot see those zeros and ones when I open the file hello*? Inside of it there are only kind of strange symbols.

  • @danielntf
    @danielntf 4 года назад

    Question on scores: so even though in "main" i used "int" as the variable for "scores" the computer doesnt actually store the value as just an "int" but the whole value because like what the prof did, i can change the value of it to a "float" using "(float)" even though it was earlier declared as an "int". Am I thinking about this correctly?

  • @peterliwyj7181
    @peterliwyj7181 4 года назад

    55:30 Sounds like a confession....he's an alien.

  • @directtoanne
    @directtoanne 4 года назад

    guys i love this programme, but can someone tell me if the brian professor david keeps referencing (in jokes and stuff) is brian yu lol
    just curious

  • @rishigulimi7583
    @rishigulimi7583 4 года назад

    i have sub and liked the video

  • @prabhatbhalla
    @prabhatbhalla 4 года назад

    what if i am not using the sc50 sanbox, if i am using any other software for c, then how will i use the get_int and get_string?

  • @fernandopandolfo8923
    @fernandopandolfo8923 4 года назад

    45:00 and how is the value of the variable "char" in the case of converting "char" to "int"
    ?
    "char" being 1byte I can print the respective value in "int", for example
    :
    "char": A => "int": 65
    1 byte => 4 byte
    It would be better to write in "char" and convert to "int"?
    Thanks, and sorry my english =)

    • @fernandopandolfo8923
      @fernandopandolfo8923 4 года назад

      @Gunay Karaoglu yeah i see!
      I am already ahead of the course and what you told me now makes sense, I managed to understand it better. In terms of data structure and algorithms he talks constantly about trade-off, thanks for your time man =D !