1.

Which of the following errors would be reported by the compiler on compiling the program given below?_x000D_ #include_x000D_ int main()_x000D_ {_x000D_ int a = 5;_x000D_ switch(a)_x000D_ {_x000D_ case 1:_x000D_ printf("First");_x000D_ _x000D_ case 2:_x000D_ printf("Second");_x000D_ _x000D_ case 3 + 2:_x000D_ printf("Third");_x000D_ _x000D_ case 5:_x000D_ printf("Final");_x000D_ break;_x000D_ _x000D_ }_x000D_ return 0;_x000D_ }

A. There is no break statement in each case.
B. Expression as in case 3 + 2 is not allowed.
C. Duplicate case case 5:
D. No error will be reported.
Answer» D. No error will be reported.


Discussion

No Comment Found