fork(3) download
  1. #include <stdio.h>
  2.  
  3. const char* f()
  4. {
  5. return "hello";
  6. }
  7. int main()
  8. {
  9. const char* c = f();
  10.  
  11. *(c + 1) = 'a';
  12.  
  13. return 0;
  14. }
  15.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:11: error: assignment of read-only location ‘*(c + 1u)’
stdout
Standard output is empty