C | Data Types | Question 9

Output of following program?

filter_none

edit
close

play_arrow

link
brightness_4
code

#include<stdio.h>
int main()
{
    float x = 0.1;
    if ( x == 0.1 )
        printf("IF");
    else if (x == 0.1f)
        printf("ELSE IF");
    else
        printf("ELSE");
}

chevron_right


(A) ELSE IF
(B) IF
(C) ELSE


Answer: (A)

Explanation:

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.