C programming allows two very useful operators.these are the increment and decrement operators,we use the increment and decrement statements in for and while loop in c programming.
Sr.No |
Operators |
Descriptions |
---|---|---|
01 |
++ |
Increment |
02 |
-- |
Decrement |
#include <stdio.h>
void main()
{
int x = 10,y = 20;
printf("Value of x : %d \n", x);
printf("Value of x : %d \n", x++);
printf("Value of x : %d \n", x);
printf("Value of y : %d \n", y);
printf("Value of y : %d \n", y--);
printf("Value of y : %d \n", y);
}