fork(2) download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. const int x = 1;
  5. int * px = &x;
  6. *px = 0;
  7. printf("x is %d", x);
  8. return 0;
  9. }
  10.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:5:14: error: initialization makes pointer from integer without a cast [-Werror]
   int * px = (int) &x;
              ^
cc1: all warnings being treated as errors
stdout
Standard output is empty