fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a[] = {2,4,10,16,7};
  6. int *s;
  7. s = a;
  8. cout<<"*s++ "<<*s++ <<endl;
  9. cout<<"*++s "<<*++s<<endl;
  10. cout<<"s++ "<<s++<<endl;
  11. cout<<"++s "<<++s<<endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
*s++ 2
*++s 10
s++ 0x7ffefcbb8c38
++s 0x7ffefcbb8c40