当前位置:网站首页>C语言中的分支和循环语句归属
C语言中的分支和循环语句归属
2022-07-23 05:39:00 【rookieﻬ°】
了解问题之前,首先我们要知道什么是语句?
C语言是结构化的程序语言
- 顺序结构:就是按正常顺序走,比如人这一辈子平平淡淡过完,没有什么波折。
- 选择结构:如:if,switch,人这一辈子,充满了十字路口;
- 循环结构:while、for、do while,吃饭睡觉,每天都在重复,这就是循环。

C语言语句可分为5大类:
1.表达式语句
2.函数调用语句
3.控制语句
4.复合语句
5.空语句
循环语句和分支语句归属于哪个部分呢?
其实,分支和循环语句归属于控制语句,什么是控制语句呢?
控制语句用于控制程序的执行流程,以实现程序的各种结构方式(C语言支持三种结构:顺序结构、选择结构、循环结构),他们由特定的语句定义符组成,C语言有九种控制语句。
可分为以下三类:
- 条件判断语句也叫分支语句:if语句、switch语句;
- 循环执行语句:do while语句、while语句、for语句;
- 转向语句:break语句、goto语句、continue语句、return语句;
边栏推荐
猜你喜欢

First meet flask

Scattered notes of machine learning: some concepts and notes

好玩的代码雨,在线分享给大家~-

PyGame realizes the airplane war game

gbk编解码器无法解码的问题,有可能出题出在文件名上

Machine learning algorithm for large factory interview (6) time series analysis
![[Python flask note 5] Blueprint simple à utiliser](/img/0a/00b259f42e2fa83d4871263cc5f184.png)
[Python flask note 5] Blueprint simple à utiliser

Install enterprise pycharm and Anaconda

Getting started with RPC and thrift

項目部署(簡版)
随机推荐
systemctl-service服务添加环境变量及模板
Pywinauto+某应用程序(学习至第9讲)--受阻
[metric]使用Prometheus监控flink1.13org.apache.flink.metrics
Pyspark learning notes
Federated primary keys and indexes
视、音频分开的网站内容如何合并?批量下载代码又该如何编写?
【系统问题】.NET Framework 3.5 安装错误
Install pyGame using CMD
项目流程总结
JS, pay attention to passing parameters. If it is a string, you need to add escape characters
安装企业版pycharm以及anaconda
[监控部署实操]基于granfana展示Prometheus的图表和loki+promtail的图表
D2DEngine食用教程(1)———最简单的程序
check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ord
JDBC Learning and simple Encapsulation
使用cmd安装pygame
知识点回顾
PyGame realizes the airplane war game
idea中复制一个项目/project
视图集及路由