Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
JavaScript
12.2K+ articles
Java
10.8K+ articles
C++
4.3K+ articles
Difference Between
3.6K+ articles
School Programming
1.5K+ articles
Programming Language
594+ articles
javascript-basics
166+ articles
loop
31+ articles
Loops & Control Structure
32 posts
Recent Articles
Popular Articles
JavaScript do...while Loop
Last Updated: 30 July 2024
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
Loops & Control Structure
Web Technologies
JavaScript
javascript-basics
Exit a loop in C++
Last Updated: 20 January 2021
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
loop
C++
Loops & Control Structure
C++ Programs
While loop with Compile time constants
Last Updated: 02 November 2023
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
Articles
Java
Loops & Control Structure
Different types of range-based for loop iterators in C++
Last Updated: 16 September 2021
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
cpp-references
C++
Loops & Control Structure
cpp-iterator
Nested Loops in C++ with Examples
Last Updated: 03 December 2019
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 do-while loop in C, C++, Java
Last Updated: 27 June 2019
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
loop
Programming Language
School Programming
Loops & Control Structure
Difference Between
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
loop
Programming Language
School Programming
Loops & Control Structure
Difference Between
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
Programming Language
C Language
C++
School Programming
Loops & Control Structure
Difference Between
DSA
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?[sourcecode language="Python3"]my_string = geek...
read more
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?[GFGTABS] Python mylist = [geeks, forgeeks...
read more
Program Output
loop
Technical Scripter
Python
Python-Output
Loops & Control Structure
Python Programs
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?[sourcecode language="JAVA" highlight=""]class Test {public static void main...
read more
Java
Java-Output
Loops & Control Structure
C | Loops & Control Structure | Question 21
Last Updated: 18 January 2014
[sourcecode language="C"]#includelt;stdio.hgt;int main(){ int a = 5; switch(a) { default: a = 4; case 6: a--; case 5: a = a+1; ca...
read more
C Language
C Quiz
C-Loops & Control Structure
Loops & Control Structure
C | Loops & Control Structure | Question 20
Last Updated: 28 June 2021
[sourcecode language="C"]#include stdio.hint main(){ int x = 3; if (x == 2); x = 0; if (x == 3) x++; else x += 2; printf(x = %d, x); return 0;}[/sourceco...
read more
C Language
C Quiz
C-Loops & Control Structure
Loops & Control Structure
C | Loops & Control Structure | Question 19
Last Updated: 28 June 2021
[sourcecode language="C"]#include stdio.hint main(){ int i = 3; while (i--) { int i = 100; i--; printf(%d , i); } return 0;}[/sourcecod...
read more
C Language
C Quiz
C-Loops & Control Structure
Loops & Control Structure
C | Loops & Control Structure | Question 18
Last Updated: 28 June 2021
How many times GeeksQuiz is printed[sourcecode language="C"]#includestdio.hint main(){ int i = -5; while (i = 5) { if (i = 0) break; else...
read more
C Language
C Quiz
C-Loops & Control Structure
Loops & Control Structure
1
2
3
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !