fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. const int x;
  5. x = 2;
  6. printf("%d", x);
  7. return 0;
  8. }
  9.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2
compilation info
prog.c: In function ‘main’:
prog.c:5:3: error: assignment of read-only variable ‘x’
 x = 2;
   ^
stdout
Standard output is empty