fork download
  1. #include<iostream>
  2. #include<climits>
  3. using namespace std;
  4.  
  5. int main(){
  6. int x = 2;
  7.  
  8. int *xPtr2 = &x;
  9. (*xPtr2)++;
  10. cout << x << endl;
  11.  
  12. (*xPtr2) = 5;
  13. cout << x << endl;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
3
5