For Loop in C programming with examples

For loop in C programming is a statement to repeat the set of statements until a condition to be satisfied. Syntax of for loop statement: for(initialization; conditionCheck; updation ) { statement 1; statement 2; ————– } “for-statement” has a initialization , condition and iteration (increment/ decrement) part separated by semicolon. Initialization : This phase allows … Read more

Do While Statement in C Programming

like a while statement,  “ do while statement” repeats a set of statements if condition is true. If condition is false the flow of control do not enter inside the do-while loop. “do-while” first execute the body of loop than tests the condition. Means even if the condition if false do-while executes at least ones. … Read more

While Statement in C Programming

“while loop” repeats a set of statements if condition is true. If condition is false the flow of control do not enter inside of while loop. It first tests the condition then execute the body of loop. Syntax of a while statement−

Example: Write a program to print 1 to 10 using while loop.

Read more