fork(1) download
  1. #include <iostream>
  2.  
  3. int *test()
  4. {
  5. return new int[10] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  6. }
  7.  
  8. int main() {
  9. int *a = test();
  10. for (int i = 0; i < 10; ++i)
  11. std::cout << a[i];
  12. return 0;
  13. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
0123456789