adplus-dvertising
frame-decoration

Question

What is the output of C Program?
int main()
{
    int a=9, b=5, c=8;
    a=b=c=10;
    if(a==9)
    {
        printf("Ostrich\n");
    }
    else
    {
        printf("Eggs\n");
    }
    
    printf("White");

    return 0;
}

a.

Ostrich
Eggs
White

b.

Ostrich
White

c.

Eggs
White

d.

Compiler error as you can not assign to more than two variables at once.

Posted under C Programming

Answer: (c).Eggs
White

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?