Output of C programs | Set 65 (If-Else)
Prerequisite : Decision making in C
c)Print 1 Infinite time
d)Both a & c
OUTPUT: (d)Both a & c
We call the main method again and again by 1 because we use post-increment. At certain time stack frame will full means segmentation fault occurs.
a)mannu is Crazy
b)paul is crazy
OUTPUT: (b)paul is crazy
Here ,comparison between long int and unsigned long int generally which is not possible.
Now,long int is promoted to unsigned long int whose value will be
OUTPUT: (c) Geeksforgeeks 0
Explanation: At first zero will assign in ‘i’ then comma operator returns the last value which is 3 and condition becomes true.
OUTPUT: (c) Hello 0
Explanation: Priority of parenthesis bracket is greater than equal to(=) operator , So atfirst comma operator return the last value which is zero(0) and then equal to(=) operator assign 0 to ‘i’ and condition becomes false.
a = 0.7 is rounded to 0.699999988
and the constant 0.7 is as 0.69999999999
so a<0.7 is true so it print “c”
but in case of 0.8
a = 0.800000011 and
constant 0.8 is 0.8000000000000000
This article is contributed by Abhishek kurmi. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.