C
Casanova
int main()
{
int i=5;
printf("\n%d",++i + ++i + ++i + ++i + ++i );
}
Why does the above program print 40 as output in TC and 41 in GCC?
logically it appeals to me that 40 makes more sense since the integer
argument to printf should evaluate to 6+7+8+9+10 = 40
Thank You
Prashanth
http://prashblog.be
{
int i=5;
printf("\n%d",++i + ++i + ++i + ++i + ++i );
}
Why does the above program print 40 as output in TC and 41 in GCC?
logically it appeals to me that 40 makes more sense since the integer
argument to printf should evaluate to 6+7+8+9+10 = 40
Thank You
Prashanth
http://prashblog.be