Loops
Loops are the control statements that are used to repeat some block of code till the specified condition is false. There are 3 loops in C:
The for loop is an entry-controlled loop that consists initialization, condition, and updating as a part of itself.
Syntax of for
for (initialization; condition; updation) { // statements }
The while loop is also an entry-controlled loop but only the condition is the part of is syntax.
Syntax of while
while (condition) { // initialization }
The do-while loop is an exit-controlled loop in which the condition is checked after the body of the loop.
Syntax of do-while
do { // statements } while (condition);
C Cheat Sheet
This C Cheat Sheet provides an overview of both basic and advanced concepts of the C language. Whether you’re a beginner or an experienced programmer, this cheat sheet will help you revise and quickly go through the core principles of the C language.
In this Cheat Sheet, we will delve into the basics of the C language, exploring its fundamental concepts that lay the groundwork for programming. We will cover topics such as variables, data types, and operators, providing you with a solid understanding of the building blocks of C programming.
Contact Us