fork download
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. char *ptr = new char[1];
  7. strcpy(ptr, "test");
  8. std::cout << ptr << std::endl;
  9.  
  10. return 0;
  11. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
test