fork download
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main() {
  6. char * str;
  7. str = new char[20];
  8. strcpy(str, "Hello, world\n");
  9. cout << str;
  10. delete[] str;
  11.  
  12. char* strs[] = { "Hello", "world" };
  13. for(auto s: strs)
  14. cout << s << endl;
  15.  
  16. }
Success #stdin #stdout 0s 4496KB
stdin
Standard input is empty
stdout
Hello, world
Hello
world