#include <iostream> using std::cout; using std::endl; int main() { int c; c = 5; cout << c << endl; cout << c++ << endl; cout << c << endl; cout << endl; c = 5; cout << c << endl; cout << ++c << endl; cout << c << endl; return 0; }
5 5 6 5 6 6
3.3.prefix postfix increment decrement operators | ||||
3.3.1. | prefix, postfix, increment, decrement operators | |||
3.3.2. | Preincrementing and postincrementing |