Increment operator : Increment decrement Operator « Operator « C Tutorial






Prefix: the value is incremented/decremented first and then applied.

Postfix: the value is applied and the value is incremented/decremented.

#include<stdio.h>

main( )
{
    int i = 3,j = 4,k;
    k = i++ + --j;
    printf("i = %d, j = %d, k = %d",i,j,k);
}
i = 4, j = 3, k = 6








5.3.Increment decrement Operator
5.3.1.Increment operator
5.3.2.The decrement operator: --