0
Can anyone explain how the and statement is not included in output
#include <stdio.h> int main() { int i=4, j=7; j = j || i++ && printf("you can"); printf("%d %d", i, j); return 0; } Please explain the whole code
4 odpowiedzi
+ 2
The || operator checks for true values. If the first value is true, then it won't bother checking the other side, so the whole && thingy will have been left out.
+ 1
But as and operator has higher precedence then why that is not evaluate at first
OR this is an exception in logical operators