Question:What would be printed on the standard output as a result of the following code snippet?
main()
{
        char option = 5;
        switch(option)
        {
                case '5':
                                printf("case : 1 \n");
                                break;
                case 5:
                                printf("case : 2 \n");
                                break;
                default:
                                printf("case : 3 \n");
                                break;
        }
        return 0;
}
 

A case : 1 

B case : 2 

C case : 3 

D Result in compilation error 

E None 

+ Answer
+ Report
Total Preview: 1417

Copyright © 2024. Powered by Intellect Software Ltd