fork download
  1. #include <stdio.h>
  2.  
  3. void my_function() {
  4. #define MESSAGE "Hello from inside the function!"
  5.  
  6. // #undef MESSAGE
  7. }
  8.  
  9. int main() {
  10. my_function();
  11. printf("%s\n", MESSAGE);
  12. // printf("%s\n", MESSAGE); // This would cause an error because MESSAGE is undefined here
  13. return 0;
  14. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Hello from inside the function!