Answers for "how to call the function to switch case in c++"

247

c++ switch

switch(expression) {
  case x:
    // code block
    break;
  case y:
    // code block
    break;
  default:
    // code block
}
Posted by: Guest on February-21-2020
0

C++ switch statement

switch(expression) {
   case constant-expression  :
      statement(s);
      break; //optional
   case constant-expression  :
      statement(s);
      break; //optional
  
   // you can have any number of case statements.
   default : //Optional
      statement(s);
}
Posted by: Guest on April-29-2022

Code answers related to "how to call the function to switch case in c++"

Code answers related to "Javascript"

Browse Popular Code Answers by Language