What is the difference between- i+1 and i++? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between- i+1 and i++?

20th May 2018, 4:48 PM
Ape
2 Answers
+ 2
i++ increments i by one and produces the rvalue i. i+1 produces the rvalue i+1
20th May 2018, 6:39 PM
Max
Max - avatar
0
i++ is known as shorthand increment.Both are same.
20th May 2018, 4:58 PM
G.S.N.V. Suraj
G.S.N.V. Suraj - avatar