What are Increment operators?

Increment operators are used to increase the value of the variables.

Types of Increment Operators:

1. Pre Increment Operator: In pre increment operator, value of the variable is first increased and then it is assigned to other variable.
Eg: int a=5,b;
b=++a;
Output:
a=5 b=6

2. Post Increment Operator: In pre increment operator, value of the variable is first assigned to other variable and then it is increased.
Eg: int a=5,b;
b=a++;
Output:
a=5 b=5

More Questions

Leave a Reply

Word Verfication * Time limit is exhausted. Please reload CAPTCHA.