Give Two Differences Between the Switch Statement and the If-else Statement.
Advertisements
प्रश्न
Give two differences between the switch statement and the If-else statement.
फरक स्पष्ट करा
Advertisements
उत्तर
| S. No. | Switch statement | if-else statement |
| 1. | In this statement, multicodes can be provided in which control transfers to different parts of the code based on the value of an expression. | In this statement, only two codes are based on either a true or a false condition. |
| 2. | Syntax:
|
Syntax:
|
shaalaa.com
Introduction of Object-oriented Programming
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
