Fortune Telling Collection - Horoscope - The use of c language switch
The use of c language switch
C language switch is used to select and execute the corresponding statement sequence according to the value of the expression. The usage of C language switch includes:
1, switch (expression). Where the expression is usually an integer or a character variable.
2.case constant expression. The rest. case statement is used to specify that the statement after case is executed when the value of the expression is equal to the value of the constant expression. If there is no break statement, the program will continue to execute the statement of the next case.
3, case constant expression, statement 2break. You can have any number of case statements.
4. If the value of the expression without any case matches the value of the expression, the statement after default is executed.
- Previous article:1997 What is the sign of the ox on August 3rd?
- Next article:What should I do if I meet a boy with a peach blossom robbery constellation?
- Related articles
- 20 14. 12. 1 What is the constellation?
- Constellation women who don't delete after breaking up
- What are the guardians of the twelve constellations?
- The most stressful constellation in the near future _ the most stressful constellation ranking in the near future
- Constellation zodiac query
- Who is He Jiong's wife (Li rumoured but brought He Jiong's wife to hot search)
- 9 1 year belongs to Capricorn in 2007.
- Phoenix Legend's real name and information?
- What are the scary quirks of Pisces?
- 925 what constellation