fork download
  1.  
  2. #include <iostream>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6.  
  7. const int M = 5;
  8.  
  9. void outnum(int* &arr)
  10. {
  11. for (int i=0; i<M; i++)
  12. cout << setw(4) << arr[i];
  13.  
  14. cout << endl;
  15. }
  16.  
  17. int main() {
  18. int* arr = new int[5];
  19.  
  20. outnum(arr);
  21.  
  22. delete [] arr;
  23. return 0;
  24. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
   0   0   0   0   0