In the code below, I was expecting answer 'Yes'. But the answer is no. That means i is getting incremented after && operation. I was expecting that i gets incremented once entire expression inside if() is evaluated. So what are the rules associated with post increment?
int main()
{
int i = 1;
if (i++ && (i == 1))
printf("Yes\n");
else
printf("No\n");
}