Multiple choice

What is the output of the given C code?

int main()
{
int i;
switch(i) // Line 1
{
default : printf("No Value\\n");
case 0 : printf("i is 0\\n");
case 1 : printf("i is 1");
}
return 0;
}

  1. No value. i is 0i is 1

  2. i is 0i is 1

  3. i is 1

  4. No output

  5. Compilation error

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is the correct answer.