Friday, November 14, 2008

Learnings of the Week [November 10-14, 2008]

In this week, our lesson is about the Switch Statement.

The Switch Statement

A switch statement is a selection statement that lets you transfer control to different statements within the switch body depending on the value of the switch expression. The switch expression must evaluate to an integral or enumeration value. The body of the switch statement contains case clauses that consist of a case label, an option default label, a case expression, and a list of statements.

A switch statement has the form:

>>-switch--(--expression--)--switch_body-----------------------------------------><

The switch body is enclosed in braces and can contain definitions, declarations, case clauses, and a default clause.



Posted by:
RAE ANGELINE S. PALEN
IV - Rizal


0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home