0
what is mean by "++of something ????
2 Respostas
+ 6
++ is the increment operator. There's also a decrement operator --. It adds/subtracts 1 to whatever it's attached to. Ex: ++counter
Where you put the ++/-- changes when it works. Putting the ++/-- first gives it high priority, while putting it second gives it low priority.
Ex:
value = counter++; //Assigns counter to value, then adds one.
value = ++counter; //Adds one, then assigns counter to value.
+ 2
"++i" =>"increment value of i by 1" then, "use incremented value of i in the expression"
"i++"=>"use value of i in expression" then, " increment value of i by 1"
ex:
i=2;
a=++i; //=>"i=i+1=2+1=3" then, "a=i=3"
ex:
i=2;
a=i++; //=>"a=i=2" then, "i=i+1=2+1=3"