fork(1) download
  1. #include <iostream>
  2.  
  3. void print (char * str)
  4. {
  5. str[0] = 'a';
  6. std::cout << str << std::endl;
  7. }
  8.  
  9. int main ()
  10. {
  11. char text[] = "test text";
  12. const char*c = text;
  13. print ( const_cast<char *> (c) );
  14. return 0;
  15. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
aest text