Control Instructions - Point Out Errors :: Discussion


5.Which of the following errors would be reported by the compiler on compiling the program given below?
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.None of above
Answer:  Option  C
Explanation:

Because, case 3 + 2: and case 5: have the same constant value 5.

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers