You are on page 1of 5

©LPU CSE101 C Programming

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
C Program Development
Environment(cont.) Phase 2: A preprocessor
Phase 1: Create your find some preprocessor
program with an editor directives (#include
program <stdio.h>) to include
other files.

Phase 3: Compiler
compiles the program
into machine languages

Phase 4: A linker links


the object code with the Phase 5: A loader loads
code in library or other the executable image
places to produce an into memory (RAM).
executable image.

Phase 6: CPU executes the


©LPU CSE101
program C Programming
one instruction at
Next Class: Program structure of C program.
Various programming tools like flow chart and
algorithms.
©LPU CSE101 C Programming

You might also like