R

Ram Sharma • 193.86K Points
Coach

Q. What is the output of C Program with Switch Statement.?

Code:
int main()
{
    
    int a=5;
    
    switch(a)
    {
        case 0: printf("0 ");
        case 3: printf("3 ");
        case 5: printf("5 ");
        default: printf("RABBIT ");
    }
       
    a=10;
    switch(a)
    {
        case 0: printf("0 ");
        case 3: printf("3 ");
        case 5: printf("5 ");
        default: printf("RABBIT "); break;
    }
    
    return 0;
}
  • (A) 5 RABBIT
  • (B) 0 3 5 RABBIT 0 3 5 RABBIT
  • (C) 0 3 5 RABBIT RABBIT
  • (D) 3 5 RABBIT RABBIT

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics