Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
In prefix (++i), the value of i is incremented first and then after value of the expression and thus becomes the new value of i .In postfix (i++), the value of i is incremented, and expression remains the same with the original value of i. For eg:- I is initialised a value of 5 so 1st prefix - ++i = 5 + 1 = 6 Show the value of the expression is 6. Postfix : ii. i++ = 5 in this the value of the initial expression will take place then after it will be incremented
5th Jul 2020, 4:27 AM
Nilesh