First Day learning the C Programming Language - Crash Course in C Programming

preview_player
Показать описание

►Lesson Description: In this series of lessons I provide you with a crash course in the C programming language. I will introduce the language to you from your very first program, and then introduce you to the other features of the C language. One of the benefits of the C language, is that it is relatively small, and a majority of the language and syntax can be learned from this series of lessons.

00:00 Introduction
1:00 Hello World Example
4:17 Understanding the compilation process
8:56 Variables (Primitive variable types)
14:17 Arrays (Fixed-size arrays)
18:52 For Loops
22:17 While Loops
24:00 Handling Bugs (Tips and bug fixes)
26:45 Block Scope (Variable lifetime)
29:33 Functions (Declaration and definition)
36:50 Recursion
39:35 Assert (and being careful with data types)
42:33 Condition Statements (if, else, elseif)
45:25 Reading user input with scanf
47:00 address of (& operator)
51:21 Pointers (Creating pointer and dereferencing)
58:33 Malloc and Free (Dynamic Memory Allocation)
1:05:44 Pass by value Semantics in C
1:11:00 C-Strings and String Literals
1:18:25 structs (user-defined composite data types)
1:28:48 Linked List
1:36:18 Conclusion

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

Mike, these are the best beginner C tutorials I have found online. You are a natural instructor. I love how you leave in your unexpected results instead of editing them. It is a really refreshing style that you have.

radman
Автор

1:05:44 Pass-by-Value.

In C when you call a function, the variables values are copied and
the copies of those variables are what is used in the function.

An argument is the value we want to pass to the function for execution.
A parameter is declared in the function header and used within the function.

*An argument* is the variable itself.
*A parameter* is the copy of the variable.


#include <stdio.h>

int doubleTheValue(int parameter)
{
parameter = parameter * 2;
return parameter;
}

int main()
{
int argument = 5;

doubleTheValue(argument);
printf("%d\n", argument); //5, the argument itself wasn't changed

argument = doubleTheValue(argument);
printf("%d\n", argument); //10

return 0;
}

slavapavlov
Автор

Simple, clean, direct, educative and organized. Thanks you for this gem!!!

franklin
Автор

LIFESAVER! Heard from your student Jamie about your course website and Youtube channel, Mike, you're really helping me out with learning the C!

maizhouyuan
Автор

I like your presentation setup and the pace of your lessons. Thanks for the quality tutorial.

bobdobbs
Автор

oh wow - i only just realised that in amongst all your other goodies you have this C series
can't stop - i have some videos to work my way through :-)

samdavepollard
Автор

Thank you Mike. This is probably the best crash course on C I've ever seen.

viktornikolov
Автор

This is such a great introduction to the language. Thanks so much for the effort you put into creating this content, as well as the decision to make it publicly available.

sarahwitzig
Автор

you're are a beast man helped me understand how to use both valgrind and gdb so quickly

sheltonngwenya
Автор

Just finished the part 1 of the series, unfortunately not in a day but rather a week, I learned a lot and understand more than ever c series out there, I loved the topics: structs, pass-by-value, and linked list. Also, I use obsidian to keep track of my notes and nvim as for my ide. Want to say thank you Mike for these free resources you're giving for free.

xamdp
Автор

Hello, i'm french and your tutorial is very clear and clever. Thanks a lot for your work!

gregorypeck
Автор

I Believe I have found a great c instructor, you were born for this Mike, thank you for this opportunity

jonathanndawula
Автор

Took me like a month, but I finally finished the video!!!! Thank

edgarurmeneta
Автор

Excellent teaching. Very well explained. Thank you :)
Hope i can build an useful application after gaining certain level of understanding of the language.

dhanushs
Автор

i hope your lesson about C and generally other programming language that you did will be exist in the future. thanks

alfin_efendi
Автор

very very good video i've watched it again and each time i learn more, can you please make tutorials about OS (Linux), maybe some networking, Kernel, compilers any of these topics and that would amazing cause you are extremely great at explaining things THANKS A LOT

youcefmantas
Автор

Hi Mike. Thanks for the series!

Props to you for using a simple text editor in your terminal and not some complicated IDE.
I tried following other tutorials on YT a few times but was always overwhelmed right from the beginning with all the complicated tools they typically use in such videos.

But now everything just clicked into place:
1. You edit your source code (which in fact is a simple text file).
2. Then you feed it to the compiler.
3. And then you run the executable.
That's all there is to it!

Even though I can use any text editor (now I know I don't need any fancy tools to code),
I decided to install vim and it feels like magic.

slavapavlov
Автор

I've taken quite a few C tutorials, but never once have I seen an example like you've given concerning the 'address of' operator enclosed in parentheses with a pointer. It made me have an 'aha' moment. 💡
printf('%d\n", *(&x));

GaryChike
Автор

37:18 How come the *countdown* function is void?
Void functions should not return anything, should they?
And yet, inside our function we literally say *return countdown(n-1);*

I mean, I sort of get it.
It doesn't return a value to the calling function. It simply calls itself recursively.
That's what the *return* means in this case.
But this syntax is quite confusing, to be honest.

slavapavlov
Автор

5:22 When our compiler sees
*#include** <stdio.h>*
it automatically "injects" the source code of the Standard I/O library into our source code, right?

Does it bring the source code of the entire library
or only those functions that we actually use in our source code?

I mean, if I only use the *printf()* function in my helloworld.c,
the compiler will inject the source code of that function only,
and it won't copy source code of, say, the *scanf()* and *puts()* functions, is that correct?

slavapavlov