Which control structure in C++ allows for multiple outcomes based on the value of an expression?

  • for loop
  • if statement
  • switch statement
  • while loop
The switch statement in C++ is used to select one choice among many based on the value of a given expression. It allows for multiple outcomes based on different constant integral values.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *