Programming Reference/Librarys
Question & Answer
Q&A is closed
Constants and Macros
#include <stdio.h> /* including standard library */ //#include <windows.h> /* uncomment this for Windows */ #define identifier replacement_name #define identifier(identifier_list) replacement_name
#include <stdio.h> /* including standard library */ //#include <windows.h> /* uncomment this for Windows */ #define ANSWER 42 int main(void){ printf("the answer to life the universe and everything is %d \n", ANSWER ); }
user@host:~$ ./define the answer to life the universe and everything is 42
#include <stdio.h> /* including standard library */ //#include <windows.h> /* uncomment this for Windows */ #define ANSWER 42 int print ( void ) { printf("the answer to life the universe and everything is %d \n", ANSWER ); return 0; } int main(void) { print(); return 0; }
user@host:~$ ./define the answer to life the universe and everything is 42