fork download
  1. #include <stdio.h>
  2.  
  3. void foo( void )
  4. {
  5. unsigned char a, b, c;
  6.  
  7. a = 10;
  8. b = 20;
  9. c = 30;
  10. printf( "c: %p\nb: %p\na: %p\n",
  11. (void *)&c,
  12. (void *)&b,
  13. (void *)&a );
  14. }
  15.  
  16.  
  17.  
  18. int main(void)
  19. {
  20. printf( "main address: %p\n",
  21. (void *)((void (*)( void ))main) );
  22. foo();
  23.  
  24.  
  25. return 0;
  26. }
  27.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
cc1: warnings being treated as errors
prog.c: In function ‘main’:
prog.c:21: error: ISO C forbids conversion of function pointer to object pointer type
stdout
Standard output is empty