Output of C Program | Set 19 Last Updated : 27 Dec, 2016 Comments Improve Suggest changes Like Article Like Report Predict the outputs of following program. Difficulty Level: Rookie Question 1 C #include <stdio.h> int main() { int a = 10, b = 20, c = 30; if (c > b > a) { printf("TRUE"); } else { printf("FALSE"); } getchar(); return 0; } Output: FALSE 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 Comment More infoAdvertise with us Next Article Output of C Program | Set 19 K kartik Follow Improve Article Tags : C Language C-Output Similar Reads Output of C Programs | Set 1 Predict the output of below programs. Question 1c#include<stdio.h> int main() { int n; for(n = 7; n!=0; n--) printf("n = %d", n--); getchar(); return 0; }Output: Above program goes in infinite loop because n is never zero when loop condition (n != 0) is checked.Question 2c #include<stdio.h 2 min read Output of C Program | Set 17 Predict the output of following C programs. Question 1 C #include<stdio.h> #define R 10 #define C 20 int main() { int (*p)[R][C]; printf("%d", sizeof(*p)); getchar(); return 0; } Output: 10*20*sizeof(int) which is "800" for compilers with integer size as 4 bytes. The pointer p is de- 2 min read Output of C Program | Set 21 Predict the output of following C programs. Question 1 C #include<stdio.h> #define fun (x) (x)*10 int main() { int t = fun(5); int i; for(i = 0; i < t; i++) printf("GeeksforGeeks\n"); return 0; } Output: Compiler Error There is an extra space in macro declaration which causes fun 2 min read Output of C Program | Set 18 Predict the output of following C programs.Question 1 C #include<stdio.h> int fun() { static int num = 40; return num--; } int main() { for(fun(); fun(); fun()) { printf("%d ", fun()); } getchar(); return 0; } Output: 38 35 32 29 26 23 20 17 14 11 8 5 2Since num is static in fun(), t 2 min read Output of C Program | Set 29 Question 1 How many times main() will get called? C main() { printf("\n main Called Again"); main(); } Answer : Infinite loop Description : There is no condition in the main() to stop the recursive calling of the main() hence it will be called infinite no of times. Question 2 Guess the out 6 min read Like