int x;
int y;
x = 1;
y = ++x; // value of x = 2, y = 2
y = x++; // value of x = 3, y = 2
x = 3;
y = x--; //value of x =2,y =3;
y = --x; //value of x 1, y= 1;
// Working of increment and decrement operators
#include <stdio.h>
int main()
{
int a = 10, b = 100;
float c = 10.5, d = 100.5;
printf("++a = %d
", ++a);
printf("--b = %d
", --b);
printf("++c = %f
", ++c);
printf("--d = %f
", --d);
return 0;
}