The C Preprocessor is not a part of the compiler, but is a separate step in the compilation process. In simple terms, a C Preprocessor is just a text substitution tool and it instructs the compiler to do required pre-processing before the actual compilation. We'll refer to the C Preprocessor as CPP.
Preprocessing directives are lines in your program that start with # . It must be the first nonblank character, and for readability, a preprocessor directive should begin in the first column.
//Preprocessor Directives in C Programming #include<stdio.h> #define LIMIT 5 #define MSG "Tutor Joes" #define custom_message(a)\ printf("\n" #a " Welcome to our institution") int main() { for(int i=0;i<LIMIT;i++) { printf("\n%d",i); } printf("\n%s",MSG); custom_message("Ram Kumar"); printf("\nFile Name : %s",__FILE__); printf("\nTime : %s",__TIME__); printf("\nLINE : %d",__LINE__); return 0; }
0 1 2 3 4 Tutor Joes "Ram Kumar" Welcome to our institution File Name : C:\Users\tutor\Desktop\C_CLASS\01)Prepro.c Time : 15:24:48 LINE : 21To download raw file Click Here
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions