C examples for Operator:Increment Decrement Operator
Illustrates the difference between prefix mode and postfix mode.
#include <stdio.h> int main(void) { int a, b;/*from www . jav a 2s . c o m*/ a = b = 5; printf("\nPost Pre"); printf("\n%d %d", a--, --b); printf("\n%d %d", a--, --b); printf("\n%d %d", a--, --b); printf("\n%d %d", a--, --b); printf("\n%d %d\n", a--, --b); return 0; }