Professional Documents
Culture Documents
Lecture 3
Lecture 3
02
C Language
LECTURE 3
04
Today’s Agenda
03
What is Pre-Processor ?
Processing Of The Program In C Language
SOURCE CODE EXPANDED SOURCE CODE Machine Code
#include <stdio.h> ……………………… 01010101111
#include <conio.h> ………………………. 01010111010
void main() void main() Compiler 10100010101
{ Preprocessor { 11001010010
clrscr(); clrscr();
printf(“Hello User”); printf(“Hello User”);
} }
Output
No. of Lines 7 No. of Lines 461 O.S
Hello User
What is ‘#’ and Why do We Write “#include” ?
o This PRE-PROCESSOR reads our program before the compiler and only
handles those line which begins with the symbol of ‘#’.
4. #if #elif
#else #endif Conditional Compilation Directive
#ifdef #ifndef
1. It reads the header file name given in angular brackets and locates
that file in our computer.
3. Due to this no. of lines in our program are increased an a separate copy of our code
gets created which is called as “EXPANDED SOURCE CODE”.
o This EXPANDED SOURCE CODE then goes to the compiler, which converts it
into MACHINE CODE.
o Finally this MACHINE CODE goes to the OS and CPU which run it and we
get the desired output.
End of Lecture 3
For any queries mail us @: scalive4u@gmail.com
Call us @ : 0755-4271659, 7879165533
Thank you