Ad Code

Ticker

6/recent/ticker-posts

introduction of c programming | basics of c programming -oklesson


Introduction of c language

If you read this post in hindi or any other language, then you scroll this post , and go end of this page section . here you can see a translate menu click this and choose your language.
 C is the most commonly used programming language currently in common use.The reason for this is that programs made in this programming language are more fast and extremely portable. This means that programs made on one computer can be run on another computer. Much of the programming of UNIX and WINDOWS is written in the C language. C language has the property of both low level language and high level language. hence this language is also called middle level language.Due to the low level language, any hardware of the system can be accessed. Due to its unique components, it is very useful in creating various application programs and system software.

Most important computer full form>>>>

C language was discovered in 1972 by Dennis Ritchie. It was manufactured in bell laboratories of America. Previously known as the B language, it was named after Ken Thompson, the first word B of his programming language BCPL(Basic combined Programming language). C is a compiled programming language. A program to be created is first converted to machine language and its output is shown. All compilers of C language are designed to be ANSI(American National Standard Institute) compliant. C programming is a case sensitive language. This means that if a letter is written in small it will be written in small. If you wrote the letter in the capital letter, then there will be an error in the program you wrote.

What is operating system ?>>>>

Structure of c program

There are some main points under this structure. Which help us in making programs. Let's see those important points.


  • Pre-processor directives
  • Global variable declarations
  • Main()
  • Local variable declaration
  • Comments


Let us now discuss these points in detail. Let's see more. After all, what is the work of these points?

1.Pre-processor directives
For example, suppose you want to make tea at your home, then you have to start the gas first. Which is your first point. Similarly in c programming, when we write a program, we first write the pre-processor directives. After that we write the header file. Every header file has an extension .h

Example-Pre-processor directives<header file.h>
#include<stdio.h>

2.Global variable declarations
We started gas to make tea. Now we'll put a pot on the gas and put water in it. Which is your second point. Similarly, the second point in C programming is to declare the global variable. The variables given here can be used in more than one function of your program. These are called global variables. These variables are declared outside of all functions.

3.Main()
We had added water to the pot to make tea. Now it is the turn to add content to it. Just like that the third most important point in C programming is main () function, it is called user define function. While compiling the program, the compiler starts checking the program you wrote with the main () function, Is there any error in your program ? A program cannot have more than one main function. It should be noted that the brackets () required with it are empty. This is the starting point of the program.

4.Local variable declarations
After the main () function, we declare the local variable. Here all those variables are declared. Only those are used inside this function.

5.Comments
It is not an imporatnt part of a program, it is only used to better understand the program. It is a non-executable part of the program. This means that the program when excute, So he does not read comments. The compiler does not give any attention to it. If you want to put comments in C programming, then you have to use these symbols.
/* Enter any comments */

sample  structure of c program

/*comments*/
pre-processor directives
global variable declarations
/* comments*/
main()
{
local variable declartaion;
statement 1;  /*comments*/
statement 2; /*comments */
...................................................
...................................................
...................................................
statement n; /* comments */
}
function()
{
local variable declaration ;
statement 1; /* comments */
....................................................
....................................................
....................................................
statement n; /* comments */
}

If you like this post, then you will definitely comment by comment box. If you feel that there is some loophole in this post or any suggestion, then you will definitely comment by comment box. on this blog for such useful information, here you will get new information every day.my next post is what is algorithm coming soon, visit every day for basic to advance in c language. Thank you for reading the post. See you again in the next post.

TAGS:-

basics of c programming,
tutorial of c programming,
introduction of c programming,
basics of c programming language,
basics of c programming structure,
basics of c programming pdf,

basics of c programming tutorial,

*Share with friends*

Post a Comment

1 Comments

Hey , Comment Your Query or Suggestion