C Programming Language – Intro to Computer Science – Harvard’s CS50 (2018)
Learn the the basics of the C programming language.
This course teaches the foundations of computer science. This video is lecture 1 of Harvard University's CS50 2018 course (part 2 since the lectures start at 0).
?Notes:
?Problem Set:
?Source Code:
⭐️Contents⭐️
⌨️ (00:00:00) Introduction
⌨️ (00:00:50) Week 0 Recap
⌨️ (00:08:01) PBJ
⌨️ (00:15:59) C
⌨️ (00:20:56) Variables
⌨️ (00:21:46) Incrementing
⌨️ (00:23:36) Conditionals
⌨️ (00:32:31) While Loops
⌨️ (00:35:52) For Loops
⌨️ (00:40:47) User Input
⌨️ (00:48:14) CS50 Sandbox
⌨️ (00:49:48) hello.c
⌨️ (00:51:18) Compilation
⌨️ (00:57:31) Command-Line Arguments
⌨️ (00:58:50) make
⌨️ (00:58:30) Debugging
⌨️ (01:11:44) get_string and printf
⌨️ (01:18:23) int.c
⌨️ (01:21:58) float.c
⌨️ (01:24:29) ints.c
⌨️ (01:28:39) floats.c
⌨️ (01:37:54) parity.c
⌨️ (01:39:13) conditions.c
⌨️ (01:40:17) answer.c
⌨️ (01:42:15) cough0.c
⌨️ (01:42:57) cough1.c
⌨️ (01:43:57) cough2.c
⌨️ (01:49:53) cough3.c
⌨️ (01:52:04) positive.c
⌨️ (01:58:05) Integer Overflow
⌨️ (02:03:04) overflow.c
⌨️ (02:09:50) Integer Underflow
Check out our full CS50 playlist:
?Notes:
?Problem Set:
?Source Code:
Lecture taught by David J. Malan. Thanks to Harvard's CS50 for giving us permission to post this lecture. Checkout their YouTube channel for more great lectures:
—
Learn to code for free and get a developer job:
Read hundreds of articles on programming:
And subscribe for new videos on technology every day:
That is a hard working instructor. I like his enthusiasm for teaching.
@Nazif Ishrak The dude gets paid WAY too much.
Thats why he is in harvard
@Cryptik ?
well hes a C.scientist
I honestly think that C is one of those languages you should learn from a good teacher. I wish I could learn the whole thing from this amazing person.
@Bill Lennon nice thing is they have the cs50 lectures from all the other years after this on Harvards YouTube page. I’m excited to finish this lecture series and then go and learn from the newest one that is going on right now. I feel it will be interesting to see what has changed from 2018 to 2022 and learning the basics twice will hopefully just make my foundation more solid before I move one to study specific areas of programming. I’m glad to see you are excited by this too ?
So so true!
The style, sequence, the right words with right visuals.
Impeccable delivery of syntax and functions explaining the why.
This lesson inspired me to allocate some time to C:
@Boban Milisavljevic I’m glad if I had any positive influence on your future, though you can learn Rust too. It requires much less effort to write performance efficient code, and it’s not as fragile as C. Rust is only a little bit slower, it’s just insignificant. Have fun in your journey!
@HandsUp you got me ready to learn as much C as i can before i learn anything else. I appreciate the random YouTube comment you made
@Guru Gamer literally everywhere. “Guru Gamer”…
Terrific video, even as a developer I found this to be a joy to as an intro and would gladly show this to my own child. David Malan is very charismatic and good at explaining complex topics.
@Servant of our Lord Jesus Christ Yes It is from Harvard’s CS50 Class.
But isn’t it from Harvard?
Holy crap, if only this guy could teach every CS class. No wonder he’s at Harvard.
@Finnigan who give them so much scholarship it’s just scam
@Blackbird Just improve yourself, focus on your school, and don’t mind the money. As long as you are passionate about what you are doing and have the discipline, you’ll get what you deserve. I know that this is what everybody says nowadays, but it’s true, as I experienced it in my own life. The people who deny this fact failed to execute it.
You are only 13; you have a long life ahead. To deserve something, you have to work for it. I understand that you might lack the money others have, but this only means you’ll grow stronger and become more successful afterward. I learned all of these by experience, not from stupid TED talks.
I hope you have a bright future, young man.
you are just saying that because it’s “Harvard”
@Blackbird Harvard is a bit overrated anyway. There’s many great universities out there.
incredibly informative video. david mulan states everything in a very understandable way. learned more in the first hour than the other 4 hour long “courses” elsewhere on youtube.
I wish I was taking the course 5 years ago.
Type of university and instructor makes a major contribution to the society.
Better society = Better instructors
C holds the place for the greatest programming language for me. I learned C++ as my first programming language in high school and loved and appreciated C even more after that.
This professor honestly blew my mind. I hope to one day have a professor like that.
Good teacher is a treasure. You need to know how to teach and have a deep insight of the knowledge. Otherwise you can’t show a reasonable overview and point the right path to enter a new area, which is extremely important in an intro course. This man is a treasure.
I wish i had such a teacher
Someone loves what they teach
C holds the place for the greatest programming language for me. I learned C++ as my first programming language in high school and loved and appreciated C even more after that.
Watched the entire video, wow! Thank you for breaking it down from electricity up to the abstraction level!
I’ve been stumbling from tutorial to tutorial trying to learn the fundamentals of coding, this guy is definitely the best teacher yet.
Really helping fill in the spaces from FCC! Gracias! Great teaching style
Taking the time to say thank you, this video has opened me up to more of the coding world.
I’ve been learning programming for several years now but I never got the CS background I really wanted. But even more importantly, I’ve been a self-proclaimed game designer for many years but I haven’t been able to work on designing games until now! This course was exactly what I needed and I’ve gone completely insane with Scratch, I made a complete pong clone in a few hours and next I want to make an R type shooter! Here’s my Pong Clone game https://scratch.mit.edu/projects/283414094/
Nice work, I played a couple rounds 🙂
I’d like to offer an alternative interpretation for the rationale of starting from 0: offsets. When you have a pointer to some address in memory, and then you have a second pointer that will start from the first pointer and “walk” along the data structure, what do you say the difference is when both pointers are equal,. i.e. when the mobile pointer is pointing to the first element? The difference is zero, that’s its offset. So to say you’re grabbing the value at address `pointer + 0` (offset zero units from the start of the data) is to say that you’re grabbing the first element. if `*(array + 0)` was equivalent to `array[1]` instead of `array[0]`, arrays would be a LOT harder to navigate and off-by-one errors would be a lot more common.
That’s the real reason: Pointer arithmetic, file offsets, anywhere you are dealing with offsets (which turns out to be most of the time), zero indexing is more mathematically natural. Or if you’re pushing elements into an array by using its length: `array[length] = value`, `memcpy(array + length, array2, MIN(availablesize, length2))`, and then `array` s length is incremented by the number of bytes added. It’s simple. People only think it’s hard because they deal with C strings which tack on an extra byte at the end while not considering it part of the array (strlen returns the length excluding the final byte).
He’s a great teacher. God bless him!
I know all this basic C stuff, but I still watched it from beginning to end because of this awesome guy and his enthusiasm! 🙂
mee too
He’s amazing.
Day 2 of teaching myself C and I am so happy to have found this video and the CS50 sandbox, my god…it’s perfect for what I need. Reading your and other peoples comments lets me know I’ve made the correct choice.
@Case Riviera only if F5 actually built the file instead of refreshing the page…
samee !!!
Both of these professors are great. Even when the abstraction starts to get heavy like with pointers and structures, where the way it’s taught starts to really matter, they do a great job at making it more intuitive.