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