C programming is a basic programming language and most commonly used programming language.
C is known as a structured high-level language.

Introduction to C programming

What is C Programming?
C Programming is a high level, general purpose procedural oriented programming language.
C language is purely a procedural oriented language because it is mainly focused on the procedures in which we write the program.
C first developed by Dennis Ritchie at AT and T bell Laboratory in the US.
We write a c program to perform the different task and there is a compiler which checks and execute the program and produce the output.

History of C Language

C is a basic programming language which is developed in 1972 by Dennis Ritchie and his colleagues. It is developed at Bell Laboratories of AT and T(American Telephone and Telegraph) which is located in the USA. The Dennis Ritchie is known as a founder of the language.

Dennis Ritchie
Founder of C – Dennis Ritchie

The main reason to develop the C language is to overcome the drawbacks of previous languages such as B, BCPL, etc. that is why C language includes many features from previous languages.

Let’s start with the C programming language

Structure of C program

As we write the code in c. There is some well-defined structure to write code.
1. Header
2. Main Function
3. Declaration
4. Body
5. Return Statement
These are the main steps in writing the program in C language which is as per the structure which is shown below in the diagram.

Structure of c program
Structure of c program

Components of C program structure

1. Header or Preprocessor directives file:

These are the first statement of c code. A preprocessor directive tells the compiler to include the standard input and output file. (Or which is used to include the library files such as standard input and output file). The header files are the files with .h extension these files contains syntax and macro functions definitions.
Syntax to include header file
#include<(Header file name).h>

Some Header files in C language.
#include<stdio.h>, #include<conio.h>, #include<string.h>, #include<stdlib.h> etc.
Second, is the external files after library file we include the external files to our program.

2. Main Function:

The actual start of our program main () indicates the starting point of the program from which the code execution starts. Main indicated its main method and the () indicates that function does not accept anything (sometimes main accepts parameters). The int main indicates that the main method returns a value.
Syntax to declare main method
int main(){ }
The curly braces between the block { } are used to bind our all code statements.

4. Declaration:

The declaration step includes the declaring the variables and constants which we are using in the program.

5. Body:

This contains a number of statements or lines of code.

6. Return Statement:

The value returned to main. This value depends upon the type of function. For example, if the return type of main is void then there will be no return statement.

First C program

The first program is to simply print the given string.
Hello world program in c

#include <stdio.h>

int main()
printf("Programming in c – DefineLoop ");

return 0;


First C program

In above our first program First line includes the input and output library.
During #include preprocessor tells the compiler to include the IO library in the program.
The second line is the start of the program from which execution starts. Next is our program statement printf is the function which is used to output the statement to the screen, the semicolon after the printf function indicates the end of the statement.

Features of C language

  1. C is a robust language.
  2. Programs written in C are is efficient and fast.
  3. Portable language.
  4. Easy to extend.
  5. Rich library support.

What is the use of C programming?

C is the most famous languages which are widely used for system programming and for implementing the operating systems. C is very flexible and versatile that is why used to write any computer applications.

Why C language is called C?

The letter C comes after the letter B. At that time The Bell Labs already had the programming language called “B”. That is why the language has been given the name C because it succeeds in previous language B.

Write A Comment