fork download
  1. #include <iostream>
  2.  
  3. int big = 1000;
  4.  
  5. void output_array(int *ptr_array, int *ptr_number)
  6. {
  7. *ptr_array = *ptr_number - 1;
  8. std :: cout << *ptr_array-- << std :: endl;
  9. std :: cout << &ptr_array << std :: endl;
  10.  
  11. for (int i = *ptr_number; i > 0; i--)
  12. {
  13. std :: cout << *ptr_array << " ";
  14. ptr_array--;
  15. }
  16. }
  17.  
  18.  
  19.  
  20.  
  21. int main()
  22. {
  23. int number;
  24. std :: cin >> number;
  25. int arr [number];
  26. for (int i = 0; i < number; i++)
  27. {
  28. std :: cin >> arr[i];
  29. }
  30.  
  31. output_array(&arr[number], &number);
  32.  
  33.  
  34.  
  35.  
  36. return 0;
  37.  
  38. }
  39.  
Success #stdin #stdout 0s 4528KB
stdin
4
3
2
1
4
stdout
3
0x7ffe0032d638
4 1 2 3