Increment and decrement operators

What differences between ++a & a++?
Result?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
int a = 5;

    ++a; // means a= a+1

     cout<< a;

     cout << ++a;

     cout<< a;

int a = 5;

    a++; // means a= a+1

     cout<< a;

     cout << a ++;

     cout<< a;

Wouldn't it be faster to try running it?
Topic archived. No new replies allowed.