当前位置:网站首页>Understanding of continue in C language (fishing_1)
Understanding of continue in C language (fishing_1)
2022-07-22 18:22:00 【To_ be_ a_ fisher】
C in ,continue Generally used in circulating body , The loop body executes to continue when , Will skip the following part , Go straight back to the front of the loop , Continue to cycle , The point to note here is : Skip the following part , Go back to the front of the loop , Continue the loop .
The following is an example of validation :
#include <stdio.h>
void main()
{
int k;
for (k = 0;k < 3;k++)
{
printf("k = %d \r\n",k);
if (k == 1)
{
printf("k = %d + 5 \r\n",k);
}
else
{
continue; // Verify whether to skip the following printf Statement back for The beginning of the cycle
}
printf("k = %d + 7 \r\n",k);
}
}
This is the printed result :
Conclusion : When... Is executed in the loop body continue When the sentence is , The program will skip the following statement , And go straight back to the beginning of the circulatory body , Continue to execute the loop body .
Welcome criticism, correction and exchange !
ps: The first blog . Moved downstairs , I plan to learn bit by bit in the future 、 Every bit of life is recorded . come on. ^_^
边栏推荐
猜你喜欢
"Review of software engineering in Wuhan University of technology" Chapter III software requirements
逆袭黑马:数据库全栈工程师(DevDBOps)培训,把最好的课程送给您!
"Review of software engineering in Wuhan University of technology" Chapter 6 | coding specification
"Review of software engineering in Wuhan University of technology" Chapter 2 | software process model
水博士
可重入函数
VCs and Verdi learning records
「武汉理工大学 软件工程复习」第六章 | 编码规范
QT notes - operation EXECL
[3D target detection] sparse convolution
随机推荐
Verilog basic syntax (2)
【Rust】为什么我建议你学一下 Rust | Rust 初探
女嘉賓報名
PostgreSQL 中 analyze table后most_common_elems 字段为什么不填充?
计算机网络学习笔记7-TCP编程流程及面试题
QT notes - vs generating multiple exe files for a project
文件描述符的复制
GBase8s数据库SET AUTOFREE 语句
Go flag package
"Review of software engineering in Wuhan University of technology" Chapter 7 | software testing
[bug] datetime format failed
zmq无锁队列的浅解
「武汉理工大学 软件工程复习」第五章 | 软件体系结构
Go FMT package details
Dokcer running Nacos container automatic exit problem
QT笔记——自定义数据类型
QT笔记——QJson
基于信誉管理模型的矿工类型鉴别机制设计
Shell script uses expect automatic interactive login to remote host for batch shutdown
QT笔记——Qt动态属性 之 unpolish() 和 polish()