Utility Functions and C Language Reference > C Language Reference > Alphabetical List of Functions > switch

switch

Example: switch

Used to control conditional operations. Control passes to the operation whose case statement matches the value of switch(expression).

switch ( variable ) 
{
    case const:
    statements...;
    default:
    statements...;
}