Toggle the parent tree of C Programming Loops. Learn Software and Hardware Tools Toggle the hierarchy tree under Learn Software and Hardware Tools. Fundamentals of the C Programming Language Toggle the hierarchy tree under Fundamentals of the C Programming Language. C Programming Loops Toggle the hierarchy tree under C Programming Loops.
A loop statement allows us to execute a statement or group of statements multiple times.
Below is a table listing the different types of loops in the C language.
Loop Type Description while loopRepeats a statement or group of statements while a given condition is true. It tests the condition before executing the loop body. for loopExecutes a sequence of statements multiple times and abbreviates the code that manages the loop variable. do … while loopLike a while statement, except that it tests the condition at the end of the loop body. nested loops You can use one or more loops inside any other while , for , or do..whil e loop.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.