What is the difference between the expression "++a" and "a++"?
4 years ago
C Programming
In the first expression, the increment would happen first on variable a, and the resulting value will be the one to be used. This is also known as a prefix increment. In the second expression, the current value of variable a would the one to be used in an operation, before the value of a itself is incremented. This is also known as postfix increment.
Sanisha Maharjan
Jan 20, 2022