adplus-dvertising
frame-decoration

Question

What will be the output of the program in 16 bit platform ?
#include <stdio.h>
int main()
{
 
    int a=2, b=1, c=2;
    switch(a)
    {
        case b:
        printf("You are in b ");
        break;
        case c:
        printf("You are in c ");
        break;
        default:printf("You are in default");
    }
    return 0;
}

a.

You are in b

b.

You are in c

c.

You are in default

d.

Compilation Error

Answer: (d).Compilation Error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the program in 16 bit platform ?