Behaviour of ++ operator in printf

int main()
    int a = 10;
    printf("\n %d %d %d %d %d %d", ++a, a++, ++a, a, a++, ++a);    
    return 0;

Note: Different compilers have different behavior for computation, but behavior is definite in respective compilers.

I will explain you the behavior in GCC and Turbo-C compiler.

First of all I will show you the behavior in GCC compiler.

Rule for GCC compiler: Continue reading