fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. int main(int argc, const char * argv[])
  8. {
  9. int a[5] = { 0, 2, 4, 6, 8 };
  10. int * p = a + 2;
  11.  
  12. for(int i: a) cout << i << " "; cout << endl;
  13. cout << ++*p-- << endl;
  14. for(int i: a) cout << i << " "; cout << endl;
  15. cout << ++*p-- << endl;
  16. for(int i: a) cout << i << " "; cout << endl;
  17.  
  18. }
  19.  
  20.  
  21.  
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
0  2  4  6  8  
5
0  2  5  6  8  
3
0  3  5  6  8