Sunday, 19 November 2017

c program execution

C programming language is a structured programming language. c program execution process is very simple. It has specific format to to write code. But there is no restriction to how to design code you can write whole code in one line also.

The c program file should be saved with an .c extension. If you are using turbo c then it will give automatic .c extension to your program. You need not to specify extension.

c program execution Process :

Source code       c compiler         machine code

 Code execution process in c programming is  done in three stages:

  •  Writing a  program(source code)
  • Compiling source code
  • Converting source code in machine code

Writing source code:

Source code refered as a your c program. You write any program it is called as source code. This source file should  be saved with an extension .c.

Compiling source code

Once program is written in second step it is compiled with the c compiler. In the process of compilation compilers compile your whole source code at a time. It is very fast process. compilers checks for errors, any violation of rule in code, if any gives warnings and errors to the user to fix it.

Converting code into machine code

Once compilation process completed. The next step is to Run the program. Actually this process is a process of converting souces code into machine code. Machine code is also refered as binary code. Machine code is in the format of 0 and 1. This binary code can be directly executed by the machines. And gives instructions to hardwares to work.

Share This
Previous Post
Next Post

Admin and author of BestBCANotes. Complted master degree in Computer Science.