In the following switch statement, must there be a break statement before the ending brace? Explain your answer.
?
switch (x)
{
case 1:
cout
What will be an ideal response?
No. Since this is the end of the switch statement and there are no additional clauses after the final case clause, the break statement is not needed. If coded, it would not be incorrect, but it is not needed.
Computer Science & Information Technology
You might also like to view...
In Access, macros are created using the Macro ________
Fill in the blank(s) with correct word
Computer Science & Information Technology
Which of the following is an alternative to a combo box?
A) Make it a required field B) Add a data validation rule C) Set a tab order D) Key in the field
Computer Science & Information Technology