0
How to validate n++ against ++n?
My question is, how could I print or really know the value of variable "num" when ++ num? I mean, num++ is different to ++num, but, how could I validate it (++num increments and assign the value, but num++ is the opposite. Is there any way to validate it?)
1 Resposta
0
What do you mean by 'validate'?
As far as I know, ++num ans num++ are identical if you are just incrementing and not immediately taking the incremented value.
If so, num++ is needed, if not then I believe ++num is kinda more effective (not that it matters).