An introduction about C programming

avatar

This post is an introductory post for C programming only for those people who don't know anything about programming yet or its first part I will also put second part in which I will give information about its detail learning

History of c program

C programming language is not the first language, but it is one of the most used language, the most basic and most sensitive language is the designer of this language Dennis Ritchie, and what did he create this language for because at the time it was designed no one There was also not such an efficient language that could give the best accurate data.

C-programming-1024x530.webp
src

Need of programming language

Whenever it comes to any programming language, then beginners who do not know about it, a thought definitely comes in their mind that what is the need of these languages, what is the purpose of making it, then it has come that it is a form of communication. The way is that we can put our talk in front of the computer through these languages, just as the medium of communication between two people is in the way of the language being used between them, in the same way communication between computer and human is done. means these are all programming languages.

Working

Now let me tell you how it works. Computer is just a machine that only knows the language of binary, that is, it understands all the things in the form of 0 and 1, but now a person always enters the computer to give any command, and If we cannot do a combination of zero and one, that's why we always write our point in this language, which is a compiler, it converts these things into the form of zero and one and gives commands to the computer. Returns the result of the work back to us in the form of the same languages, the most important work between these two is the compiler compiler which converts machine code into computer code and converts computer code into machine code.

Uses

Although at present there are many programming languages ​​which are used like java python c plus plus and people think that c language is very old and basic language so its demand will be less nowadays but it is not the case of c language everywhere It is used wherever we have to take the result instant i.e. if you want the result immediately without any timeline then you have to write the program in C language, nowadays all the video games that are made use C language because in the games. The person wants instant results, according to their buttons, they want to see them on the screen immediately, that's why C programs are used in all game development.

Basic structure of program

This is the basic structure of a C program

#include <stdio.h>
int main()
{
// Our first basic program in C
printf("Hello World!\n\n");
return 0;
}

Failure of c program

There are some things that did not prove successful even in this language, wow, there were some programs in this language that gave different outputs when run on different low fighters and this was the only thing which was the most proved unsuccessful.

void main()
{
int i=5;
printf("%d%d%d%d%d",i++,i--,++i,--i,i);
}

that program gives different value in different complier.

Thank you

Posted with STEMGeeks



0
0
0.000
1 comments