×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

loop

A collection of 7 posts

C++

while loop in C++

while loop is a most basic loop in C++. while loop has one control condition, and executes as long the condition is true. The condition of the loop is tested before the body of the loop is executed, hence it is called an entry-controlled loop.

Harshita Sahai Harshita Sahai
C++

do while loop in C++

Do while loop in C++ is an exit controlled loop and hence, it executes at least once even when the test-expression is false initially. We illustrate the concept and usage in C with different examples

Harshita Sahai Harshita Sahai
Software Engineering

An in-depth look into Recursion in C

Recursion is a coding technique/ design in which a function calls itself directly or indirectly and the corresponding function is called as recursive function. Using this many problems can be solved easily with less time. C, C++, Java, Python, Go and others support Recursion except Fortan 77

Harshita Sahai Harshita Sahai
Software Engineering

for loop in C

Loop is a programming concept which is natively supported by C. Loops are used to repeat a particular coding task where each repetition follows a particular pattern which can be incorporated in a code. Example of such a task is printing integers from 1 to 10.

Harshita Sahai Harshita Sahai
control statement

for loop control statement

A for loop allows us to write a loop that is executed a specific number of times. The loop enables us to perform n number of steps together in one line. We have provided the flow diagram, syntax and example to demonstrate for loop.

Tanya Anand Tanya Anand
control statement

do while loop control statement

A do-while loop is similar to a while loop, except the fact that it is guaranteed to execute at least one time. The do-while loop checks its condition at the bottom of the loop after one time execution of do.

Tanya Anand Tanya Anand
control statement

While loop control statement

A while loop is a control flow statement that allows code to be executed repeatedly based on a given condition. We have provided a flow chart, syntax and programming example to demonstrate while loop

Tanya Anand Tanya Anand
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship