Easy learning with example program codes

c preprocessor define

C #define:

A macro value in C replaces a part of a program with a value already defined by #define directive.


#define macro_Name macro_Value


#define PI 3.14  
void main()
printf("PI :%f\n",PI );    
printf("Date :%s\n", __DATE__ );    
printf("Time :%s\n", __TIME__ );    
printf("Line :%d\n", __LINE__ );    
printf("STDC :%d\n", __STDC__ ); 	 


PI :3.140000
Date :Sep 19 2018
Time :11:43:00
Line :8
Posted in C   
Sign Up/ Sign In
Ask a Question

Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2018 CodesJava Protection Status SiteMap Reference: Java Wiki