Loop in c
What is Loop
In programming, a loop is a sequence of statement that used for repeated of statement until a specific condition not reached.
By the example, we can understand in an easy way without using loop
Suppose that you want to print 10,20,100,1000 times then just think it’s possible but very difficult to type or copy-paste. By using loop we can print many types only two or three line of code.
There are three types of loop used in c.
- do while
For Loop In C
or loop used for executes for a group of statement repetition until condition not reached. First, initialize then check print statement and after increment/decrement then check a condition and again print statement.
the syntax of - for loop in c.
A simple example of - for loop in c.
Print Codeverb.com message for 5 times by using for loop
Just look here we do not repeat statement Codeverb.com but only two or three lines of code we are printing here for 5 times Codeverb.com messages
© 2017 - All Rights Reserved