+ 2
Difference between pre-increment and post-increment operator, also give actual scenarios where it can be used.
3 Answers
+ 12
https://www.sololearn.com/discuss/127187/?ref=app
https://www.sololearn.com/discuss/286799/?ref=app
https://www.sololearn.com/discuss/160327/?ref=app
and many more.......
just search them.......
+ 9
Differences :
1. Main difference is in the name. One starts with "pre" and another starts with "post".
2. Pre-increment increases first then deploys. and post-increment deploys first then increases value.
3. In pre-increment you need to write ++ operator before the variable and in post-increment you will need to write the ++ operator after the variable.
4. most of the people use post-increment in loops.
+ 2
same problem here :(