Posts

Showing posts from September, 2018

Loops in C Programming

Image
In our daily life, when we use the word loop, one thing which comes to our mind is just like a circle and a circle is a closed shape. If we consider the circle's boundary like a road and we have to travel on that road, what will happen? We come back on our starting point again and again.

The same concept is used in programming languages with the word loop. When we have to perform a specific task, again and again, we use a loop to repeat that task instead of writing the same code repeatedly. You will understand this concept by understanding that if we have to print counting from 1 to 100 or if we have to print the records of all the people in our database or if we want to find the factorial of a particular number, we use loops because in all above scenarios we have to repeat something.
Loop in Computer Programming:In programming, a loop is a set of code that is continually repeated until or unless a certain condition is reached.
When we have to repeat a statement many times that maybe…