There are six phases of c program development. First phase is editor. Editor is a tool used to create a design code. Created design code save on disk. There are many editor in which one of them is vim editor generally used in Linux operating system. Second phase is processor used for processing of the created code.
Third phase is compiler and interpreter. Compiler and interpreter are the tool used to translate programming language in to machine language. It is used to create a object code.
Fourth phase is linker. Our program using different routines. Linker is used to include these functions and routine in program code. And thus make the programming code in executable form. Then save it on this. Fifth phase is loader. To execute the program we need to load it in memory (RAM) and instruct the processor to start the execution. This task perform by the loader.
Last phase is CPU. CPU take the instruction one by one and then execute.
Thus this phase has great importance in development of c program.
Programmer creates program in the editor and stores it on disk.one of the text editor is vim which creates the c program files in Linux operating system.
phase 2: preprocessor
The c preprocessor is a macro processor that is used automatically by the c compiler to transform your program before actual compilation .
phase 3:compiler & interpreter
The compiler read the whole program and translated it into machine language completely.compiler needs syntactically correct program to produce an executable code.
phase 4:linker
Linker link the object code with the libraries creates an executable file and stores it on disk.
phase 5: Loader
The process which loads the program into memory and then instruct the processor to start the execution of the program from the first instruction.
phase 6: CPU
CPU takes each instruction and executes it.possibly storing new data values as the program executes.
Programmer creates program in the editor and stores it on disk.one of the text editor is vim which creates the c program files in Linux operating system.
It makes .c files
2: preprocessor
The c preprocessor is a macro processor that is used automatically by the c compiler to transform your program before actual compilation .
It can be seen using gcc -E prog.c
3:compiler & interpreter
The compiler read the whole program and translated it into machine language completely.compiler needs syntactically correct program to produce an executable code. It makes .o object files. It can be made using gcc -c prog.c
4:linker
Linker link the object code with the libraries creates an executable file and stores it on disk. It can be made using gcc -o prog prog1.o prog2.o or simply gcc -o prog1 prog1.o
5: Loader
The process which loads the program into memory and then instruct the processor to start the execution of the program from the first instruction.
It makes an ELF file.
6: CPU
CPU takes each instruction and executes it.possibly storing new data values as the program executes.
It is execution stage.
For doing first five steps in one go use command : make prog --> It will compile prog.c ang create ELF file as "prog"