Logical Operators and increment operators [duplicate]
问题 This question already has an answer here : Short circuit behavior of logical expressions in C in this example (1 answer) Closed last year . Can anyone explain this code? How value is assigned to only variable m but the output is for all variables change. Also the roles of logical operator and increment operators over here. #include <stdio.h> #include <stdlib.h> int main() { int i=-3, j=2, k=0, m; m = ++i || ++j && ++k; printf("%d%d%d%d\n", i, j, k, m); return 0; } 回答1: || or logical OR