0
What is the used of x++?
5 Réponses
+ 13
x=x+1
+ 1
x++, x=x+1 and x+=1 are the same
+ 1
as other has said it increment value of x by 1. But if it used again not at that line. like ++x increases value of x by 1 immediately but x++ increases its value by 1 if it used again.
+ 1
x++ increments x after x executes.
++x increments x before x executes
0
x++ => use x in statement then add 1 to x
++x => add 1 to x then use x in statement