[Solved] Why is this the output of the code?


printf() returns the number of characters written. When called with a an empty format string (""), that value will of course be 0, which will be considered “false” by the if, and thus the else branch is taken.

And no, you certainly can’t switch() on strings in C.

4

solved Why is this the output of the code?