#include <stdio.h>
int
main (void)
{
int a, b;
a = 5;
++a;
printf ("After ++a, a is now %d\n", a);
a++;
printf ("After a++, a is now %d\n", a);
b = a++;
printf ("After b=a++, a is now %d and b is %d\n", a, b);
b = ++a;
printf ("After b=++a, a is now %d and b is %d\n", a, b);
--a;
printf ("After --a, a is now %d\n", a);
a--;
printf ("After a--, a is now %d\n", a);
b = a--;
printf ("After b=a--, a is now %d and b is %d\n", a, b);
b = --a;
printf ("After b=++a, a is now %d and b is %d\n", a, b);
return (0);
}
After ++a, a is now 6
After a++, a is now 7
After b=a++, a is now 8 and b is 7
After b=++a, a is now 9 and b is 9
After --a, a is now 8
After a--, a is now 7
After b=a--, a is now 6 and b is 7
After b=++a, a is now 5 and b is 5