Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. int x;
  2. int y;
  3.  
  4. // Increment operators
  5. x = 1;
  6. y = ++x; // x is now 2, y is also 2
  7. y = x++; // x is now 3, y is 2
  8.  
  9. // Decrement operators
  10. x = 3;
  11. y = x--; // x is now 2, y is 3
  12. y = --x; // x is now 1, y is also 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement