


The increment operator is indicated by ++ and is used to

increment the variable by 1.



eg. ++marks;

increments the value of the variable marks by 1.




It can be used in two ways : as a prefix, (++var), meaning that

the operator precedes the variable; and as a postfix, (var++), where the operator follows the variable.




In prefix the variable gets incremented first where as in postfix

the variable gets incremented after the operation of function of its associate operator.




Decrement Operators are similar to Increment Operators except

the fact for the operation of decrementation by 1. It can also be

used both as prefix and postfix forms of its format.

eg. --marks;

is used to decrement the value of marks by 1.



attention@computerscienceexpertise.com


















