I get it now! I understood this !i as, since 2 is not = 0 it is true and the second NOT made it false. I was missing how C evaluates it. Thanks for the clarification:)
Now if I have another...
Type: Posts; User: shellwoo3
I get it now! I understood this !i as, since 2 is not = 0 it is true and the second NOT made it false. I was missing how C evaluates it. Thanks for the clarification:)
Now if I have another...
1st: Okay I'll remember that... new to system. But if you post a new question to an old thread, how will it get noticed?
2nd: I'm still not sure I get this expression: Since !i is true, then with...
Thanks Soma... this too makes sense and it's an easy reference. :o
Okay, thank you very much. This expression was killing me, but I get it!!!!
Okay, i think i am getting it. Because ++1 has a value greater than zero, there is no need for the expression to increment the value of j or k?
It evaluates the left operand first, then the right operand. RIGHT?
Is the left operand (++i || ++j)? If so, doesn't the value of j change because it is incremented before it is evaluated?
int main()
{
int i = 1, j = 1, k = 1;
printf("%d ", ++i || ++j && ++k);
printf("%d %d %d ", i, j, k);
return 0;
}