Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x;
- int y;
- // Increment operators
- x = 1;
- y = ++x; // x is now 2, y is also 2
- y = x++; // x is now 3, y is 2
- // Decrement operators
- x = 3;
- y = x--; // x is now 2, y is 3
- y = --x; // x is now 1, y is also 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement