What is the difference between ++i and ++i, both are increment, but i am confused with their operations.
any one kindly make me understand how they both works and what is the output, the output is same i have tried.
x is 11
and
x is 11
any one kindly make me understand how they both works and what is the output, the output is same i have tried.
Code:
int main()
{
int x = 10;
x++;
printf("x is %d", x);
return 0;
}
and
Code:
int main()
{
int x = 10;
++x;
printf("x is %d", x);
return 0;
}
x is 11