Course Content

Course Content

Introduction to C Programming

Hello everyone.

My name is Atharva Singh and today we are going to start one C programming course.

In this C programming from start to end we will discover all the concepts of C programming and we will learn them.

Before understanding the C programming language, before understanding how the C programming language is written, what are the things we can make with it.

It is very important for us to know what a program is.

After that it is also very important for us to know how programming is done.

After that we will see why the programming language concept we had to establish and how many types of programming languages are there? After that when we will be diving into C programming, at that time we will see what type of language is the C programming language.

So, all these questions will be answered in this video.

So, without any delay we will start this video.

So, first of all we will see what exactly a program is.

Here we can see that there is a simple definition, which says that it is a set of instructions.

This is a definition of four to five words of a program.

From this we are able to understand that any set of instructions, like we have given someone instructions.

So those set of instructions, those will be called a program.

Let's understand this with a basic example.

Like all of us must have seen a pet animal with someone or the other.

So, what do we give that pet animal? We give instructions to that pet animal.

Like now you have to start to walk, now you have to stop, you should stand up, sit down or you must eat this, you don’t have to eat this, start walking, stop walking.

All these sets of instructions that we give to a pet animal.

Our pet animal follows all these instructions and it designs its action based on those instructions and follows them.

So, these actions are coming because of our given set of instructions.

So, what will these sets of instructions be called? These sets of instructions will be called a program.

What did we do? We have programmed our pet animal.

How did we do it? We gave it a few sets of instructions and that pet animal followed it and our work got completed.

Right? We will understand this with another basic example.

Suppose that the computer or a laptop kept in front of us, is switched off for now and we have to start it.

What is the process to start a PC or a laptop? First of all, we will have to turn on the power supply, that is the basic one.

Then our CPU or the laptop’s power button should be switched on.

After switching on the power button, our machine will start.

Computer’s fan will start, in 30 to 40 seconds our computer will start.

And then it will ask for a password for our account.

We will enter the password and submit it and with the help of this process, we will start our computer.

So, the instructions that we gave to our computer like first to on the computer, we switched on the power supply.

After that we switched on the power button.

Then we entered the password.

We clicked on the submit button.

So, all these instructions that we gave to a computer or the instructions that we followed.

After following these instructions, the end result was switching on our computer.

This end result that we achieved, what was the reason for that? It was because of the set of instructions that we followed and these sets of instructions we call as one program.

It means if we have to get some work done from our computer, what will we do? We will give it a few sets of instructions in any form with the help of a keyboard or mouse, so the instructions that we will give it, our computer will accept it, it will follow it and perform the actions.

This entire process will be complete with the help of one program.

Now, we will see ahead, we have understood the program but what is this programming.

Okay, so now this set of instructions that were there, the program that was there, in which way did we tell this to our computer? We passed on all these instructions with the help of a keyboard and a mouse to the computer.

To understand this, we will take a basic example again with the help of the computer itself.

Now what is there in the computer? There is a file which we have to copy and paste it somewhere else.

A simple copy and paste, this work we have to perform.

What will we do for this? We will either use the computer’s mouse or the keyboard, we will press “Ctrl+C” on the keyboard or we will right click on the mouse and copy the file and we will paste it where we wish to place it.

This copy paste process that we had to complete, we completed it with the help of a keyboard and a mouse.

So, the instructions that we have to give to copy the file from here and paste it here, so these instructions that we had to give, we gave it with the help of what? With the help of keyboard and mouse.

This entire process of giving the instructions, we call this programming.

So, to make the program or to provide the set of instructions that we are making to any computer in front of us or to any human being, we call that programming.

In the computer world his entire process is called programming.

And to complete this programming process, we require a programming language.

In the same way as two people, like me and a person sitting in front of me, I want to talk to him.

What I will do is I will use any language to have a conversation with that person.

Suppose I'm talking in Hindi right now.

So, I will talk in Hindi or you can say, I will talk in English.

It can be any language but with the help of this language we are able to converse, which means that two people are able to talk to each other.

Same case, if we consider our computer, will our computer understand Hindi language? Like I'm talking right now, is my computer able to understand it directly? No, to explain the entire process to the computer the application which will be required or the setup that will be required, that is called the programming language.

Like we have languages, Hindi, English or any other language, in the same way there is a language to explain to the computer and that language is called a programming language.

Now there are a lot of types of programming languages.

We will discuss these types further.

These programming languages have their own set of rules.

Like there is grammar in our Hindi and English language, which defines a set of rules like you have to use these words in the future tense and in past tense you have to use these words.

Similarly, the programming language which we have even for that there are few sets of rules which we have to follow.

There are few syntaxes, which means the way of writing is set that you have to write this process only in this way.

Only after that the programming language can be completed.

With the help of that programming language, the instructions that we have to give to our computer that we can give.

Now we have understood what is a program, what is programming and what is the need of a programming language.

Going ahead we will see how many types of programming languages are there.

In the next slide we will see that there are 4 types of programming languages.

From which the first type is procedural programming.

Example of procedural programming, the basic example is C programming language, which we are going to learn in this course.

Now what exactly is procedural programming we will understand.

Again, we will understand it with an example.

Suppose we have to make tea and we have got the recipe to make the tea, first of all we have to keep the utensil on the stove.

Then we have to switch on the stove, we have to add milk in it, then tea leaves, then sugar, this entire process of making tea is set.

You have to do this first, then this, then this, you have to follow the steps and at the end the result will be that the tea will be ready.

But if we interchange the flow or the chronology of the recipe, like if we don’t keep the utensils first.

We put the milk directly and switch on the stove at the end.

So, will we be able to make the tea properly or will we be able to make the tea at all? Absolutely not.

Why? Because we didn’t follow the set or the flow of the recipe which was there accurately.

Similarly, the programming languages that run in a structured way, they run as per a procedure, those we call as C programming language or you can call it procedural programming.

And C programming language is an excellent example of this procedural programming language, which we will see going ahead in which way this C language is absolutely structured and procedured.

So, this concept we will see in our coming up slides.

Now we will go ahead and see which is the other type of the programming language.

The second type is object-oriented programming.

Now, what is this object-oriented programming? Name seems to be very complex, but actually it is not that complex.

Now, we will understand even this with an example.

Suppose there is a general car and we have to represent that car in our computer.

Which means what are the properties of the car? It runs on the road, it has got four tires, it has got four doors on it or maybe five.

Similarly, whichever properties are there of our car, general properties, we have to collect all of those in our computer and make one object in which all these properties would be reflected.

Now, how will we do this? We will do this with the help of object-oriented programming.

We will understand it with one more example.

If we have a camera in front of us or if there's a computer in front of us, if I have to represent this computer in our computer.

Now what are the qualities of a computer? It has a keyboard with it, it has a mouse with it.

There's also a screen on it.

Apart from that there is also an operating system in it that is working.

All these characteristics and properties which are there in our computer, all those I have to represent in my system.

So, in which way I'll be able to do it? With the help of object-oriented programming, I can represent all these things in my computer very easily.

 Just by considering its characteristics and properties.

Suppose I made a general car’s definition object in my computer.

Now what I have to do is all the types of cars which are there like SUV, MPV, sedan or hatchback or any other type of cars, what I have to do is I have to make an object of those cars as well.

Which means I have to make a representation in my system but will I have to write all those things again like there were tires, there were doors and how many…then the car runs on the road.

All these properties which were there, to make a new car, will I have to define these properties again in my system.

No, I have made the general car’s definition once.

Then I will take all those definitions for this car as well; I will add on into it and make a new segment which we will call as SUV or some other segment which we will call as MPV.

So, basically, this characterization to represent the real-life object in our system, the programming language which helps us, we call that as object-oriented programming.

And there is one example of it, C++ programming language.

We will go ahead and see what the third type of programming language is.

Third type is logical programming language.

What is a logical programming language? We will understand it with one example.

Now we have one doctor here, every day there are 200 to 300 patients that come to this doctor and it is very much difficult for the doctor to consult or to see all these patients and give them the prescriptions.

The doctor takes a lot of time and sometimes he is not able to complete it in a day.

Now what will the doctor do? He will make a set of logical questions.

In those logical questions, there will be example questions like, do you have a fever or not? Do you have a cold and cough or not? If you have a fever what is the temperature? So, the Doctor will make a set of logical questions.

Whichever patient will come, he will first write the answers to these questions.

So, whenever the doctor will go to that patient, he will already have the answers to those sets of questions where the doctor will Know exactly what the patient is suffering from.

And according to that he will give the prescription and the patient will be able to happily return home.

In this way the doctor will be able to handle all the patients.

So, this process can develop with the help of logical programming.

An example of a logical programming language is Prolog programming language.

Okay.

So, this helps in developing logically, the way the doctor made a logical program which was answered by every patient and after diagnosing that the doctor was making the prescription.

This makes the process very easy when we use a logical programming language.

Its example is Prolog programming language.

Now we have seen three types.

Now we will see the fourth type of programming language.

What is the fourth type? It is called a functional programming language.

What is a functional programming language? Suppose, I have to give my residential address to someone.

What will I say? You have to take a right from ahead, then left, then after 100 metres again you have to take a right.

In this way I will explain all the turns and I will tell you that you will take this right turn and after that you will reach my house.

But if I have to tell the same process to a lot of people.

Okay.

I cannot tell everyone that you go left and right or go this way to reach my house.

What will I do instead is I will make one function in my computer, in my system and in that all the steps would be written like you have to go left, right, etc.

And you will reach my house.

All these steps which are there, I will make a function and I'll put all those in the programming language and whenever someone will ask me my address, I will hand out that function.

I will tell them, take this function and this function will tell you or guide you that you have to take a left or a right and how to reach my house.

These functions which are there, we can make these with the help of functional programming languages and the best example of this is Python programming language.

Okay.

So, here we have seen four types of programming languages.

First was the Procedural, then came the Object-Oriented Programming, after that we saw the Logical Programming Language and then at the end, we saw the Functional Programming language.

So, we considered here four basic types of programming languages.

So, we will see, which was C language.

C is one procedural programming language, okay.

Now, we have seen what is a program, what is programming, what are programming languages.

Then we saw what the types of programming languages and their examples.

After knowing all these things, now we will straight away go to C programming.

Before learning C programming, we will see why we have to learn C programming? The first option, which is there, it says that it is very easy to learn.

Okay.

when we said that the conversation between us and the computer, to make that we make the use of programming language.

What does that programming language do? It converts the human understandable language into a computer language which is also called the binary language.

Because our computer only understands the language of zeros and ones, even if you press one key on your keyboard, your computer will convert it into a combination of zeros and ones and understand it.

Our computer only understands the combination of zeros and ones, with the help of which the C programming comes into picture here and what the C programming does is our human understandable language like English and few special characters are used with the combination of English words.

We make a combination and write what we want the computer to do.

What will C programming do? It will take it, gather it in one place and it will convert into that binary language which our computer understands.

And after converting it into that our computer will understand what exactly the computer needs to do.

According to that it will follow all the steps and it will complete our program.

It is easy to learn because we don't have to learn the computer's binary language where we have to make the combinations of zeros and ones for everything.

What do we have to do here? We have to use one human understandable language, which is not very difficult.

It is easy where English words are used, and few special characters are used.

There are few indentations that are being used.

All these things have been used which are very easy for us to understand and we do not have to learn binary language.

Because the combination of zeros and ones will become too long.

It is impossible for a human to understand it.

So, this C programming language comes in between and tells us that you don't need to learn binary language, you can make me understand it in my language.

I will explain it further to the computer.

That is a reason why the C programming language is easy to learn.

Now we have seen that C programming language is a procedural programming language where we see that it goes in one flow, there is a structure to it.

That's the reason why it is a structured language.

Everything has a process or place or the positions of writing the sentences in the code, which means inside the program, that will be fixed.

First of all you have to define this, then after that you have to write this, then you have to write this, so slowly it becomes one structure in C programming language, that's the reason why it is also called as a structured programming language also.

And after that we will see since it's a very basic language, basic means our computer also easily understands it and even we don't find it very difficult to understand it.

So, it makes extremely efficient programs.

Like if we take an example of my SQL, one database management system which is a big thing, even this has been designed under C programming language.

You can understand from this that the C programming language which is there, it is very easy for the computer and even for us.

That is the reason why we should learn it.

After that the last point says that it can be compiled on various computer platforms.

We can consider Windows, Mac OS or Linux or any other computer platform.

We can compile C programming language in all these platforms.

After this we will understand the basic facts.

The C programming language was invented to make UNIX operating system.

UNIX operating system is similar to windows.

The way the windows work, the UNIX operating system works in a similar way.

To make that the C programming language was invented.

Before that there was one B programming language at that time, around 1977.

So, that's the reason when we made this language, we called it successor of B and named it C.

Apart from that this is the most widely used system programming language, which means that wherever we go in the entire world there will be a lot of people who will know the C programming language.

After that we will see, this Linus operating system or my SQL database, all these things have been made in C programming language.

So, you can see how big is its functionality and efficiency because of all these big software's applications and operating systems which are there, we could make them with the help of this language.

Now, we will go ahead and see one basic program which has been written in a C programming language.

On the left side we can see that there are four or five lines written.

And basically these 4 to 5 lines, what is it ordering to the computer, what are the instructions it is giving to the computer? It is telling the computer to print one statement or give an output where it is written “Hello world”.

On the right side of the screen, we can see “hello world” and on the left side there is a four or five line program written in C programming language.

After writing the four lines, the output that we are getting is saying “hello world”.

So, see how simple this thing is.

To print “hello world” what does the computer have to have to tell itself? These four sentences, basically these are four five lines, you have to type it out and tell the computer that you have to print it in this way.

Okay.

After following your instructions the computer, the C programming language, converts and you see “Hello world” on your screen.

This is the output printed on the screen.

So, using the C programming language is so functional and it's so simple.

In our following courses, which means videos, we will know more about this C programming language.

We will see how these are written and what are the things we can use to better its functionalities.

All these things we will cover in the coming videos.

If you feel that there is any part of this topic or this video that you may not have understood.

Based on that topic, any question or query you can ask us without any inhibition.

You just have to go on forums.learnvern.com You have to type out your query there in your language, we will come to you with the solution or the answer as soon as possible in your own language.

Apart from this if you want to have a discussion on any of the topics, even that you can do on forums.learnvern.com.

Our next video’s topic will be how we can install the C programming language in our computer and set it up and after that we will start one basic C program.

Meanwhile, you practise this, we will meet in our coming videos.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere