I'm new to the C programming language and trying to understand the operator precedence in the following code
int main()
{
int i = 10;
if (i == 20 || 30)
printf("true");
else
printf("false");
return 0;
}
the output is 'True' in the above case.
Also, if I replace condition "||" with "&&" the output is 'False'. Again is it because of the precedence of the operator "||" or "&&" over "=="?
Could anyone please explain whether the above assumption is correct or not? and any further details if I'm missing any?