YTread Logo
YTread Logo

C Programming Tutorial 4 - How a C Program Works - Part 1

Apr 03, 2020
welcome everyone it's Caleb from Caleb's friend Mike Stowe and I'm assuming based on the last video they had their first show running that was the goal if you've had any experience and are familiar with some of the stuff in the video previous. okay but I'm going to teach like you don't know anything so the

program

we wrote had a lot of commands and keywords and all this fancy stuff in there and most likely at first you just have to memorize how to write these things you won't obsessions with it, even though you don't feel like you have to compromise how to write everything with your eyes closed just know that in the beginning you will have to do some things that maybe I don't understand at a deep level enough to understand why you are doing things, but at the end of the series, my goal is for you to be able to see every single thing we just did in the previous video and a lot of the upcoming videos now.
c programming tutorial 4   how a c program works   part 1
I want you to be able to explain what what is why ar you are doing it and what is the benefit of doing it in the scope of the whole

program

in the above video we wrote our first program and run it if I were to visually see how hard it could be it could look like this that's what it's called a learning curve you need at least this knowledge to fully understand everything we did in the previous video but you can't get all this knowledge in one second so we have to build our way to that point so starting in this video we're going to start with the very basic concept of how the AC program

works

now I'm not talking about how to compile it and how it runs and how the computer can understand that that's basic crap we've talked about it in video number one like he always does this he's talking about how our code means something and how we can communicate what we want to say to the computer in C, so if you don't know what I'm talking about, keep watching when you're working with computers.
c programming tutorial 4   how a c program works   part 1

More Interesting Facts About,

c programming tutorial 4 how a c program works part 1...

I know they are very very dumb so you have to break things down and be very specific with what you want me to do so let's pretend you have the intelligence of a computer and I'm going to tell you what to do and what I want to tell you to do it's to like this video and know that it's not a subliminal message but you must like this video so how do you like this video? To say it very super specific, first you have to move your hand to the mouth, then you have to grab the mouth and then hover your mouse until your cursor is over the like button on the screen and then you click the left mouse button the whole concept of explaining everything step by step is known as an algorithm everything we want a computer to do we first need to express as an algorithm in english then its easier to convert our algorithm which is in english to C and you will see it in action a as you progress in this series.
c programming tutorial 4   how a c program works   part 1
Now, what if I wanted to show you an algorithm, just like any video on my entire channel? We're going to have to tweak the algorithm a little bit and I'm going to write it so you can see each step and well this is an algorithm where you can plug in whatever video I have so I'm going to put the title of the video in there. and this will teach you how to like that video, not only do computers need very specific instructions, but they also don't remember how to do things, so if I wanted to tell you to like another video, I would have to repeat all six. these instructions so essentially you would have 12 instructions now just two like two videos well wouldn't it be great if we could somehow teach the computer how to like a video without having to repeat these six instructions?
c programming tutorial 4   how a c program works   part 1
What if we could say how? video and then say which video we wanted the computer to like well actually we can do that and that introduces something called a function so a function is basically a bunch of all these came in my chalk blew up so this function is basically a group of statements that you can just boil down to a single statement this is how a computer learns if you want to think about it in human terms so let's call this entire function as video when you tell someone to tell you like this video or you tell the computer to like a video are calling that function so what that means is we could open this up and say something like yes and once again don't get caught up if you don't understand everything but what this says is that we're waiting for a video title to fix here and now to call this function somewhere else let's just put this aside all we have to do is do this.
I don't have a lot of space here so I've squashed it here but essentially all we have to do is say the name of the function or just the general command like video and say which video we want to like the reason why I explain everything this is because in

programming

we like to break sections of our code into repeatable sections so essentially you get commands we can tell the computer r when we do functions like this things get more modular we have these modules we can put together to do apps now what if I wanted to expand on this and say hey once you liked the video I want you to tell me how many?
People liked that video well that's the concept of a return so I want you to give me the like back so every function can have a return and inside a function it would look like this return something and we can just finish. the statement with a semicolon so in the last video our program started with something like this and then inside this at the end we had a return zero if it asks what the return returns like who gets this zero where is it if goes well, we can have programs that call our program, so it's like a program chain and the zero just means everything was ok, even in other

programming

languages ​​a lot of them start with me and that's just the input of our program is where we start we always start here on the first line of the main function so that's your first piece to understand why we wrote as we tied up the video above you always want to start your program with a main function and at the end , you want to return zero and this here is wondering if we'll get into this later but int is the data type of zero so don't worry about that for now thanks everyone for looking as always I made sure res to subscribe. forget there are notes you can download and you can also watch the next video.
I don't know if I pointed the right way, but somewhere on the screen there are some buttons that click, thanks, bye.

If you have any copyright issue, please Contact