Output of C Program | Set 19
Predict the outputs of following program.
Difficulty Level: Rookie
a = 10, b = 20, c = 30;
(c > b > a)
Let us consider the condition inside the if statement. Since there are two greater than (>) operators in expression “c > b > a”, associativity of > is considered. Associativity of > is left to right. So, expression c > b > a is evaluated as ( (c > b) > a ) which is false.
Please write comments if you find any of the answers/explanations incorrect, or you want to share more information about the topics discussed above