What is the output of this C code ?

Function main() {
integer a = 5, b = 7
Switch(a) {
Case 5: print "I am 5"
Break
Case b: print "I am not 5"
Break
Default: print "I am different"
}
}

A. I am 5

B. I am not 5

C. I am different

D. Error

E. None of these

Answer : D. Error

Explanation:

  • Break doesn’t have “;” (Semi Colon missing in break command)

 

Categorized in:

C

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Share Article:

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock