Mega Code Archive

 
Categories / C / Macro Preprocessor
 

Define macro inside the main function

#include <stdio.h> void f(void); int main(void) {   #define LIGHTSPEED 186000   f();   return 0; } void f(void) {   printf("%ld", LIGHTSPEED); }