ICSE Class 10 Computer Applications Question 29 of 30

Solved Sample Paper 3 — Question 29

Back to all questions
29
Question

Question 2(ix)

Write the syntax of switch statement.

Answer

The syntax of switch statement is as follows:

switch (expression)
{
    case value1:
        statements;
        break;
    case value2:
        statements;
        break;
    ...
    ...
    case valueN:
        statements;
        break;
    default:
        statements;
}