English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Write the Syntax of Switch statement. - Computer Applications

Advertisements
Advertisements

Question

Write the Syntax of Switch statement.

Answer in Brief

Solution

switch (n) {
 case label1:
 code to be executed if n=label1;
 break;
 case label2:
 code to be executed if n=label2;
 break;
 case label3:
 code to be executed if n=label3;
 break;
 ...
 default:
 code to be executed if n is different from all labels;
}
shaalaa.com
If elseif else Statement in PHP
  Is there an error in this question or solution?
Chapter 6: PHP Conditional Statements - Evaluation - PART – II [Page 111]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 12 TN Board
Chapter 6 PHP Conditional Statements
Evaluation - PART – II | Q 8. | Page 111
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×