This is due to the definition of the post-increment statement.
post-increment operator : increases as you use it.
Operatorpre-increment : incremented before the value is used.
So, if you do it your own way, the value returned by the function is incremental.
The textbooks enlarge the object itself, but return the non-increased COPY of the object.
source
share