Precedence of && over || [duplicate]
问题 This question already has answers here : Evaluation of the following expression (3 answers) Closed 3 months ago . As I know logical operator && has higher precedence than || . On running the code: #include <stdio.h> int main() { int i = 1, j =1, k = 1; printf(\"%d\\n\",++i || ++j && ++k); printf(\"%d %d %d\",i,j,k); return 0; } is giving the output: 1 2 1 1 which is possible only when ++i || ++j && ++k is evaluated like this: (++i) || (++j && ++k) But, according to operator precedence rule it