adplus-dvertising
frame-decoration

Question

What is the output of C Program?
int main()
{
    int a=9, b;
    
    b = (a==9) ? (printf("CAT\n");printf("DOG\n")) : (printf("FOX"));

    return 0;
}

a.

CAT
DOG

b.

FOX

c.

CAT
DOG
FOX

d.

Compiler error

Posted under C Programming

Answer: (d).Compiler error

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?