fork download
  1. #include <stdio.h>
  2.  
  3. void demo()
  4. {
  5. printf("demo");
  6. }
  7.  
  8. int main()
  9. {
  10. printf("%p", demo);
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:10:5: error: format ‘%p’ expects argument of type ‘void *’, but argument 2 has type ‘void (*)()’ [-Werror=format=]
     printf("%p", demo);
     ^
cc1: all warnings being treated as errors
stdout
Standard output is empty