adplus-dvertising
frame-decoration

Question

What is the output of C Program?
int main()
{
    int x=1;
    float y = 1.0;
    if(x == y)
    {
        printf("Polo\n");
    }
    if( 1 == 1.0)
    {
        printf("Golf\n");
    }

    if( 1.0 == 1.0f )
    {
         printf("Boxing\n");
    }
    return 0;
}

a.

No Output

b.

Boxing

c.

Golf
Boxing

d.

Polo
Golf
Boxing

Posted under C Programming

Answer: (d).Polo
Golf
Boxing

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of C Program?