0

what is mean by "++of something ????

5th Feb 2017, 4:39 AM
vini
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.
5th Feb 2017, 4:48 AM
Tamra
Tamra - avatar
+ 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"
5th Feb 2017, 5:02 AM
Pankaj Singha