Write down the general syntax of switch statement-02382
This subjective question is related to the book/course vu mth718 Topics in Numerical Methods. It can also be found in vu mth718 Mid Term Solved Past Paper No. 10.
Question 1: Write down the general syntax of switch statement.
case constant1 : statementLlist1 ;
case constant2: statementLlist1 ;
default: statementLlist1 ;
} page 67
Answer:
switch ( variable/expression ) {case constant1 : statementLlist1 ;
case constant2: statementLlist1 ;
default: statementLlist1 ;
} page 67