How to execute C language

C program execute with the help of translator software. Which reads the code and find error if there is any mistake and that code convert into binary.

How to execute C language
How to execute C language
How to execute "C program" ? 

The C program execute with the help of translator software. Which reads the code and find error if there is any mistake and that code convert  into computer language/binary language which is the form of 0 and 1.
       Translator software is a system software which is translate one programming language to an other programming language.

Types of translator software:

There are following types:-
Compiler:- It is a system software that convert entire high-level language into machine language, then execute the code.

Developed by Grace Hopper, who created the first compiler in 1952.   
For example:- GCC (for C,C++), Javac (for Java).

Interpreter:- It is a system software that execute the code line by line, without convert into the machine language. Developed by John Backus and his team in 1957.

For example:- Python Interpreter, Ruby MRI, Node.js. 

Assembler:- It is a system software that is convert to assemble language ( low level code ) into machine language.

Developed by Kathleen Booth, who worked on the first assembly language and its assembler in late 1950s

 For example:- NASM (Netwide Assembler), MASM (Microsoft Macro Assembler).

Decompiler:- It is a system software that Converts machine code/ bytecode back into a high-level programming language.

Developed by Various teams of researchers in reverse engineering in late 1980s - 1990s.

For example :- JD-GUI (Java), Ghidra, Hex-Rays IDA Pro.

Step of Algorithm C language

  1. Start 
  2. Declaration of variables 
  3. Read the variables 
  4. Process 
  5. Display 
  6. Result 
  7. Stop

Flow chart

It is proctorial representation of an algorithm which shows the logic  of problem and its allow to break the problem into parts.
Flow chart
Flow chart

Structure of C language

#preprocessor
  • Including header file
  • Global variables declaration 
  • Main()
  • Declaration 
  • User defined function 

Code

#include <stdio.h>
 int main() {
 Printf("Hello world!");
 return 0;
}

Result :- Hello world!

Post a Comment