STEP OF EXECUTION OF C PROGRAM
During the execution of C program following steps are performed by system:
Step 1: Create C Program
- User creates a program to perform specific task.
- Program has set of instruction.
- User writes set of instructions in C Editor.
- This Program is also known as source program or source code.
- User store/save a program as file name .C in specific location.
Step 2: Compiling C Program
- After creation of C Program compiler checks any error is occurred or not.
- If any error is occurred then it will display all errors in one message box.
- If any error is not occurred, compiler converts source program into object file which is in 0 or 1 form (Machine Code)
- After Compilation, linker linked object file with system library and converts object file into executable file.
Step 3: Execution of C Program
- Loader loads executable file from hard-disk to RAM.
- Finally Processor execute C Program from RAM.
DEFINITION OF COMPILER, LINKER, LOADER, ASSEMBLER, TRANSLATOR, INTERPRETER:- Compiler: Compiler is a system program to find out errors from the program and converts source code to machine code/object code.
- Linker: Linker is a system program to link object file with system library and converts object file into executable file.
- Loader: Loader is a system program to load executable file from hard-disk to RAM (Primary Memory).
- Assembler: Assembler is a system program to convert assembly language code to machine code.
- Translator: Translator is a system program to convert high level language to low level language.
There are two translators:
1. Compiler
2. Interpreter
- Interpreter: Interpreter is a system program to check/find out error line by line from your program and converts source code to machine code.
Comments
Post a Comment