int main()
{
int var1=4, var2=6;
var2=var2||var1++&&printf("computer world");
printf("%d%d",var1,var2);
getch();
}
The printed answer is 41.
Question:
Here it is not printing the 'computer world'.
According to order of priority we have to calculate the &&
logical operator but the behaviour here is not like that and the value of var1
should increment after that statement but doesn't.
My expected answer is computer world51
.