5.(C) Basics of increment operators in detail

 #include <stdio.h>


int main()
{
    int i = 5;
    //  printf("The value after i++ is %d\n",i++);
    //i++ -->> first print the value and increment
    printf("The value after i++ is %d\n", ++i);
    //but ++i-->> first increment value then print the number

    printf("The value of  i is %d\n", i);

    i += 10; //-->Increments i by 10
    printf("The value of  i is %d\n", i);

    return 0;
}

Comments