Loops in C language: What are loops? Loops are used for performing a task again and again in other words loops are used for checking number of iterations performed. There are 3 main types of loops in c language. for loop while loop do while loop We are going to do for loop in this article with some couple of problems. For executing a loop there are mostly three main steps Initialization Condition Increment or Decrement operator. 1. Initialization: It provides the starting value to the variable to start the loop or the value from where the loop should be started. 2. Condition: It is used for checking the condition if the condition is true than the process is executed until the condition becomes false. 3.Increment or Decrement Operator: It is used for incrementing or decrementing the value variable each time after the loop is executed (i++) - Increases the value of variable by 1. (i+=1) - Increases the value of variable by 1. (i=i+1) -
This site is based on teaching the fundamentals of coding in the simplest way possible with my experience as a computer science student for beginners as well as for a learner who wants to master it.