当前位置:网站首页>The attribution of branch and loop statements in C language

The attribution of branch and loop statements in C language

2022-07-23 11:19:00 rookieﻬ°

C Language is a structured programming language

  1. Sequential structure : Just follow the normal order , For example, people spend their whole life in an ordinary way , There are no twists and turns .
  2. Selection structure : Such as :if,switch, All my life , Full of crossroads ;
  3. Loop structure :while、for、do while, Eat and sleep , It's repeated every day , This is the cycle .
     Insert picture description here

C Language statements can be divided into 5 Categories: :

1. Expression statement
2. Function call statements
3. Control statement
4. Compound statement
5. Empty statement

Which part do loop statements and branch statements belong to ?

Actually , Branch and loop statements belong to Control statement , What is? Control statement Well ?
   Control statement Used to control the execution flow of the program , In order to realize the various structures of the program (C The language supports three structures : Sequential structure 、 Selection structure 、 Loop structure ), They consist of specific statement Defiers ,C There are nine control statements in language .
   It can be divided into three categories :

  1. Conditional judgment statements are also called branch statements :if sentence 、switch sentence ;
  2. Loop statement :do while sentence 、while sentence 、for sentence ;
  3. Turn to statement :break sentence 、goto sentence 、continue sentence 、return sentence ;
原网站

版权声明
本文为[rookieﻬ°]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207230537405400.html