0

Difference between pre and post increment in for loops

Is there any difference between: for (int i = 0; i < 10; ++i); for (int i = 0; i < 10; i++); Does it have any impact on performance or it's up to one's coding style?

1st Oct 2021, 7:06 PM
Tim
Tim - avatar
2 Réponses
+ 3
No difference. Because increment statements there are single individual statements.. It may differ if those are compound statement for example.
1st Oct 2021, 7:59 PM
Jayakrishna 🇮🇳