Westonci.ca is the premier destination for reliable answers to your questions, provided by a community of experts. Get detailed and accurate answers to your questions from a community of experts on our comprehensive Q&A platform. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

What is the result of the following code?
int x = 1;
switch(x)
{
case 1: printf( "Help" );
case 0: printf( "Me" );
break;
case 2: printf( "Hello World" );
}
A. HelpMe
B. Help
C. Help Me
D. Hello World

Sagot :

Answer:

B: Help

Explanation:

During the execution of this switch statement, it will print "Help" because that's the only case that matches the value of x, it will not print "Me" because that case does not match, so it will fall through that case into the break statement.