So am I the only one who thinks this is just too confusing?
You are declaring 2 integers, but the declaration of the second then overrides the declaration of the first.
Why would you allow coding to do this?
What if you need the original value of a?
All of this is for when you want to increment aand also use it in another context e.g. passing the value to a function or initialising another variable. So if you ever want to do
b = a;
++a;
// another example
foo(a);
++a;
You can just write
b = a++;
// another example
foo(a++);
Or if you want to write
++a;
b = a;
// another example
++a;
foo(a);
You can write
b = ++a;
// another example
f(++a);
In other words, if you want to use a variable and then increment it you can use postfix. If you want increment a variable and then use it you can use prefix.