C Program Development Environment
A C program must go through various phases such as:
1. Creating a program with editor
2. Execution of preprocessor program
3. Compilation
4. Linking
5. Loading
6. Executing
©LPU CSE101 C Programming
, Program is created in
Editor Disk the editor and stored
on disk.
Preprocessor program
Preprocessor Disk processes the code.
Compiler creates
Compiler Disk object code and stores
it on disk.
Linker links the object
Linker Disk code with the libraries,
Primary Memory
Loader
Loader puts program in memory.
Disk ..
..
..
Primary Memory
CPU CPU takes each
instruction and
executes it, possibly
.. storing new data
..
.. values as the program
executes.
©LPU CSE101 C Programming
, Difference between library and headerfile
Header File is On other hand Library is
the file where all the file where the
the headers implementation code of
name are each header is written
mentioned that down which is mentioned
going to be used in the Header file.
or consumed in
the main code
file.
©LPU CSE101 C Programming
, C Program Development
Environment(cont.)
Phase 1: Create your Phase 2: A preprocessor Phase 3: Compiler
program with an editor find some preprocessor compiles the program
program directives (#include into machine languages
<stdio.h>) to include
other files.
Phase 6: CPU executes the Phase 5: A loader loads Phase 4: A linker links
program one instruction at the executable image the object code with the
a time. The load process in into memory (RAM). code in library or other
Windows OS is just input places to produce an
the name of the executable image.
executable file.
©LPU CSE101 C Programming
A C program must go through various phases such as:
1. Creating a program with editor
2. Execution of preprocessor program
3. Compilation
4. Linking
5. Loading
6. Executing
©LPU CSE101 C Programming
, Program is created in
Editor Disk the editor and stored
on disk.
Preprocessor program
Preprocessor Disk processes the code.
Compiler creates
Compiler Disk object code and stores
it on disk.
Linker links the object
Linker Disk code with the libraries,
Primary Memory
Loader
Loader puts program in memory.
Disk ..
..
..
Primary Memory
CPU CPU takes each
instruction and
executes it, possibly
.. storing new data
..
.. values as the program
executes.
©LPU CSE101 C Programming
, Difference between library and headerfile
Header File is On other hand Library is
the file where all the file where the
the headers implementation code of
name are each header is written
mentioned that down which is mentioned
going to be used in the Header file.
or consumed in
the main code
file.
©LPU CSE101 C Programming
, C Program Development
Environment(cont.)
Phase 1: Create your Phase 2: A preprocessor Phase 3: Compiler
program with an editor find some preprocessor compiles the program
program directives (#include into machine languages
<stdio.h>) to include
other files.
Phase 6: CPU executes the Phase 5: A loader loads Phase 4: A linker links
program one instruction at the executable image the object code with the
a time. The load process in into memory (RAM). code in library or other
Windows OS is just input places to produce an
the name of the executable image.
executable file.
©LPU CSE101 C Programming