fork(11) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. char arr[ ] = "This is a test";
  6. string str = string(arr);
  7. cout << str;
  8. // "This is a test"
  9. return 0;
  10. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
This is a test