C Programming Language Introduction and Basic Concept of C Language

Sumant jha
7 min readJan 13, 2021

So I’m going to start a course on programming in C language.

Some basic things here we discuss like what is the need for programming?
Why do you write programs? What is the need for writing these programs?
What is the need for programming languages?
And then we will come to c programming language.

What is the need for programming or (C Programming Language)?

so now let us discuss what is the need for programming? Why do you write programs?

To see the computer is what? it’s you can say a machine or you can say a general-purpose machine. The use of computers is what, which can perform any task, any computational task, not any task any computational task it can perform. But how do you communicate with computer-like suppose, if you want to add two numbers then it’s not like that you will say hey computer I want to add two numbers 4 and 5. So tell me what is the addition of 4 and 5 number, the computer will not understand your language. So now what you will do we will write some instructions. You can say a sequence of instructions and we will give those sequence or set of instructions to the computer and then according to that computer will perform your task. So those set of instructions or what program sequence of instructions is what? programs. That is why if you want that your computer will perform some task for you. You have to write programs. That is why we need to write programs and C programming Language is the best option to write it.

But now see the language of the computer is what, a binary language I hope you all know 0 and 1. Computer can understand only 0 and 1 binary so if you write like if you write instructions in the English language. In the language or in any language computer will not understand. Then what we will do that also will discuss how that language how that program will be converted into zero and when and then the computer will perform your task.

So basically you can say what computer run by programs. The computer is nothing without programs. It cannot do anything without programs. When you purchase a new laptop or computer, that has already you know many programs are already there. In that program, so you can sorry in your computer like some system programs application programs or you must have heard about system software’s application.

Software is what definitely? It is a set of programs. So system programs mean what they are going to manage that system resources they are going to manage the hardware and application programs or application software are what they are basically used to perform your tasks. your task like a web browser in its application software and text editor. In which you can edit, you can write text, you can edit text, ms office that is also an application software. But suppose if you want the computer to perform your own task any specific task. According to that, you have to write your own program and you have to submit that program. You have to give that program to the computer and then the computer will understand your program or you can say those sequence of instructions and according to that will give you some output.

So now how do you write programs like it’s not like in simple English language? You will write programs in c programming language and submit to computer no, it is not going to understand so for that thing we need programming languages or c programming language right. See when we communicate with each other like if I want to communicate with you then the language is maybe English, Hindi. So and for communication what first of all you need to understand, the alphabets. First, we study what abcd and then words then we frame sentences by using grammars and all and then we communicate. Then we frame sentences and then we communicate with each other. The same thing in language also you need to learn something before writing the programs like the characters, character set of that language, keywords, and some syntaxes and some rules and then we can write programs in c programming language. And then we can interact with computers.

But the point here is what the computer can understand only 0 and 1? And you are writing programs in what if suppose c programming language. we take the example of c language here then definitely we are not going to write like 0 1 0 0 1 suppose I write this one this is a bunch of 0s and 1 but we are not able to understand what is meaning of this thing. But maybe the computer can understand obviously computer will understand, because it is the language of computer right so we write programs…

So that program, first of all, have to be converted into this language machine language zero and one form and then the computer will execute your program written in a c programming language or more specifically I would say CPU. Because it is what processor central processing unit. This is a processor this is you can say the heart of the computer. The calculation, the computation, the task which you are going you need to perform on a computer. That is going to be performed by the CPU more specifically. If I will say then CPU will give you output. So if you write a program, in this format this is machine-level language. I hope you have heard about machine level languages, assembly level languages then high-level languages or low-level languages middle-level languages.

But we will generally prefer to call high-level languages. High-level languages mean the c, c++, c#, java. These are understandable by humans because if we write this if we see this code then we are not going we will not understand. What is this so this is machine level language right but before the invention of these high-level languages. They used to write programs in this format. See, you can imagine how tough it was at that time to write a program in this language (machine language). Because see this is what this is according to you, know that CPU architecture some set of specifications are there. Which architecture is there? which CPU follows? I think you will or maybe you have studied the subject CO or computer organization and architecture. In that, you must have studied those architectures.

So according to that specification the arc architecture of the CPU, this code will differ. It means it is machine-dependent. In one computer the same program as the addition of two numbers let us suppose in at one CPU. Suppose according to the CPU architecture or the specifications the instruction can be given in 20 bits like 20 bits and the first four-bit are for the operator.

I hope everybody knows like I suppose I am writing 1 plus 2. 1 and 2 these are operands and plus is operator here we write as opcode suppose these first 4 bits are for this class to indicate this plus and suppose here plus I’ll write like 0 0 1 0 0 0 1 0. so the computer will understand that this is for plus that he has to perform plus operation and then next eight bits are for one this operand and next eight bits are for the second operand. We will write these two operands into binary form like zero zero zero seven zeros and one and two. How you will write? this is two in binary form so that we will write here and when we submit this instruction then the CPU will perform addition on one on one and two and it will give you the result and suppose the according to the specification of CPU to the second processor may be there plus is 0 0 0 1 or maybe the length of the instruction is something else, not 20 bits so it’s not easy to write programs in machine language because it is dependent on that machine to machine. So it is not the programs are not portable in one machine.

If you are writing a program for the addition then again you have to write rewrite that program for the second machine. It’s not like that the same program will run on the second machine that is very difficult than assembly level languages.

After that high-level languages come to overcome these limitations to add portability concept. So that one program on one machine we write and that program can easily be ported to the second machine. This means we can run that program same program on the second machine also without any modification or maybe you can say with few modifications.

Read about c programming language

You can also visit our institute

My Computer Institute

Address: Ground Floor, B/22, Topaz Trade Center, Tulinj Rd, opp. Janta Bazar, near Amit Dairy, Nalasopara East, Nala Sopara, Maharashtra 401209

Phone: 084465 30415 / 084465 30416

--

--