Switch labels Label (computer science)



two types of labels can put in switch statement. case label consists of keyword case, followed expression evaluates integer constant. default label consists of keyword default. case labels used associate integer value statement in code. when switch statement reached, program execution continues statement after case label value matches value in parentheses of switch. if there no such case label, there default label, program execution continues statement after default label. if there no default label, program execution continues after switch.



within single switch statement, integer constant associated each case label must unique. there may or may not default statement. there no restriction on order of labels within switch. requirement case labels values evaluate integer constants gives compiler more room optimizations.







Comments

Popular posts from this blog

Discography Neuronium

Discography E-Rotic

Deep sea mining Marine pollution