fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. std::string Exec(char* cmd) {
  5. cout << cmd;
  6. cmd[0] = 'S';
  7. cout << cmd;
  8. return std::string("");
  9. }
  10.  
  11. int main() {
  12. Exec("hello");
  13. //const char* str = "hello";
  14. //Exec(str);
  15. return 0;
  16. }
Runtime error #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Standard output is empty