Data Structure
Java
Python
HTML
Interview Preparation
Interview Prep
Tutorials
Tracks
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Python
19.6K+ articles
JavaScript
9.9K+ articles
Java
9.3K+ articles
C++
3.7K+ articles
JavaScript-Questions
2.1K+ articles
javascript-basics
166+ articles
Java-Output
54+ articles
loop
31+ articles
Loops & Control Structure
12 posts
Recent Articles
Popular Articles
JavaScript do...while Loop
Last Updated: 23 July 2025
A do...while loop in JavaScript is a control structure where the code executes repeatedly based on a given boolean condition. It's similar to a repeating if statement. One...
read more
JavaScript
Web Technologies
Loops & Control Structure
javascript-basics
Exit a loop in C++
Last Updated: 23 July 2025
Exit a Loop in C++: If the condition of an iteration statement (for, while, or do-while statement) is omitted, that loop will not terminate unless the user explicitly exit...
read more
C++ Programs
C++
C++ Quiz
loop
Loops & Control Structure
While loop with Compile time constants
Last Updated: 15 July 2025
While loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if st...
read more
Misc
Java
Articles
Loops & Control Structure
Different types of range-based for loop iterators in C++
Last Updated: 15 July 2025
Range-Based 'for' loops have been included in the language since C++11. It automatically iterates (loops) over the iterable (container). This is very efficient when used w...
read more
C++
cpp-iterator
cpp-references
Loops & Control Structure
Nested Loops in C++ with Examples
Last Updated: 12 July 2025
Nested loop means a loop statement inside another loop statement. That is why nested loops are also called as "loop inside loop".Syntax for Nested For loop:for ( initializ...
read more
C++
Loops & Control Structure
Difference between for and while loop in C, C++, Java
Last Updated: 04 September 2023
In C, C++, and Java, both for loop and while loop is used to repetitively execute a set of statements a specific number of times. However, there are differences in their d...
read more
DSA
loop
Loops & Control Structure
Difference between for and do-while loop in C, C++, Java
Last Updated: 11 July 2025
for loop: for loop provides a concise way of writing the loop structure. Unlike a while loop, a for statement consumes the initialization, condition and increment/decremen...
read more
DSA
loop
Loops & Control Structure
Difference between while and do-while loop in C, C++, Java
Last Updated: 17 July 2024
while loop: A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a...
read more
Java
Loops & Control Structure
JavaScript Loops
Last Updated: 25 September 2025
Loops in JavaScript are used to reduce repetitive tasks by repeatedly executing a block of code as long as a specified condition is true. This makes code more concise and ...
read more
JavaScript
Web Technologies
Loops & Control Structure
javascript-basics
JavaScript-Questions
Output of Python Programs | Set 23 (String in loops)
Last Updated: 14 December 2017
Prerequisite: Loops and StringNote: Output of all these programs is tested on Python31. What is the output of the following?Python3 my_string = geeksforgeeksi =...
read more
Misc
Technical Scripter
Python
Program Output
Python-Output
Loops & Control Structure
Output of Python Programs | Set 22 (Loops)
Last Updated: 06 September 2024
Prerequisite: LoopsNote: Output of all these programs is tested on Python3 1. What is the output of the following?Pythonmylist = ['geeks', 'forgeeks']for i in mylist: ...
read more
Misc
Technical Scripter
Python
Python Programs
Program Output
loop
Python-Output
Loops & Control Structure
Output of Java Programs | Set 43 (Conditional statements & Loops)
Last Updated: 29 September 2017
Prerequisite: Decision Control and Loops1. What will be the output of the following program?JAVA class Test {public static void main(String[] args) { ...
read more
Java
Java-Output
Loops & Control Structure