English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Differentiate Switch and if else statement. - Computer Applications

Advertisements
Advertisements

Question

Differentiate Switch and if else statement.

Distinguish Between

Solution

Switch statement if-else statement
Switch statement uses single expression for multiple choices. the if-else statement uses multiple statements for multiple choices.
Switch statement test only for equality. if-else statement test for equality as well as for logical expression.
Switch statement execute one case af­ter another till a break statement is appeared or the end of switch statement is reached. Either if statement will be executed or else statement is executed.
shaalaa.com
Php Conditional Statements
  Is there an error in this question or solution?
Chapter 6: PHP Conditional Statements - Evaluation - PART – III [Page 111]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×