Unlike other operators, the increment and decrement operators act on only one operand. They are hence called Unary operators.
They can be used either before or after a variable as in:
a++; b--; OR ++a; --b;
Read the section again, if you’ve not understood this concept.
Take a look at the following code… what do you think will be the value of variable res?
var res = 25 + 100 * 4;
There are two ways to look at this
res = 25 + (100 * 4); res = 425 OR res = (25 + 100) * 4; res = 500
At one time, Coca-Cola had an online music store - myCokeMusic.com. It ceased operation on 31st July 2006. Even though they had myCokeMusic.com music store, Coca-Cola still did a promotion that involved Apple iTunes. In July 2005, a free iTunes song was given away with every 32 US fl oz Slurpee bought from 7-Eleven. [more...]