Final answer:
Pre-increment adds 1 to the value of a and then returns the updated value. Post-increment returns the original value of a and then adds 1 to it.
Step-by-step explanation:
The difference between pre/postfix increment (i.e. ++a vs a++) is as follows:
- Pre-increment adds 1 to the value of a and then returns the updated value. Post-increment returns the original value of a and then adds 1 to it.
- Pre-increment returns the original value of a and then adds 1 to it. Post-increment adds 1 to the value of a and then returns the updated value.
- Pre-increment adds 1 to the value of a and then returns the updated value. Post-increment adds 1 to the value of a but returns the original value.
- Pre-increment returns the original value of a and then adds 1 to it. Post-increment returns the updated value of a after adding 1 to it.