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
Misc
8.8K+ articles
C++
4.3K+ articles
Difference Between
3.6K+ articles
C Language
1.8K+ articles
C-Output
70+ articles
CPP-Output
39+ articles
loop
31+ articles
c-puzzle
30+ articles
cpp-switch
8+ articles
C-Loops & Control Statements
15 posts
Recent Articles
Popular Articles
Output of C programs | Set 56 (While loop)
Last Updated: 25 September 2017
Prerequisite : While loopsQ.1 What is the output of this program?CPP #include iostreamusing namespace std;int main(){ unsigned int x = 3; while (x-- = 0) ...
read more
C Language
C-Output
CPP-Output
C-Loops & Control Statements
Difference between while(1) and while(0) in C language
Last Updated: 08 November 2022
Prerequisite: while loop in C/C++In most computer programming languages, a while loop is a control flow statement that allows code to be executed repeatedly based on a giv...
read more
Misc
Difference Between
C Language
C-Loops & Control Statements
Output of C programs | Set 57 (for loop)
Last Updated: 02 October 2017
Prerequisite : for loopQ.1 What is the output of this program? C #include iostreamusing namespace std;int main(){ for (5; 2; 2) printf("Hello\n"); ...
read more
C Language
C-Output
C-Loops & Control Statements
Output of C programs | Set 59 (Loops and Control Statements)
Last Updated: 31 August 2021
Prerequisite : Control StatementsQ.1 What is the output of this program? CPP #include iostreamusing namespace std;int main(){ char i = 0; for (; i++; pri...
read more
C Language
C-Output
C-Loops & Control Statements
Output of C programs | Set 61 (Loops)
Last Updated: 04 October 2017
Prerequisite : Loops in CQ.1 What is the output of this program? CPP #include iostreamusing namespace std;int main(){ int i, j, var = 'A'; for (i = 5; i...
read more
C Language
C-Output
C-Loops & Control Statements
Nested Loops in C
Last Updated: 28 May 2025
A nested loop means a loop statement inside another loop statement. That is why nested loops are also called "loop inside loops". We can define any number of loops inside ...
read more
C Language
C-Loops & Control Statements
Difference between Sentinel and Counter Controlled Loop in C
Last Updated: 25 January 2023
Sentinel Controlled LoopA sentinel controlled loop is also called an indefinite repetition loop because the number of iterations is not known before the loop starts execut...
read more
Difference Between
C Language
loop
C-Loops & Control Statements
Switch Statement in C
Last Updated: 19 May 2025
C switch statement is a conditional statement that allows you to execute different code blocks based on the value of a variable or an expression. It is often used in place...
read more
C Language
C-Loops & Control Statements
Jump Statements in C
Last Updated: 14 July 2023
In C, jump statements are used to jump from one part of the code to another altering the normal flow of the program. They are used to transfer the program control to somew...
read more
C Language
C-Loops & Control Statements
For vs. While
Last Updated: 28 February 2025
In C, loops are the fundamental part of language that are used to repeat a block of code multiple times. The two most commonly used loops are the for loop and the while lo...
read more
C Language
c-puzzle
C-Loops & Control Statements
A nested loop puzzle
Last Updated: 12 March 2023
Which of the following two code segments is faster? Assume that compiler makes no optimizations. C++ /* FIRST */for(i = 0; i 10; i++) for(j = 0; j 100; j++)...
read more
C Language
C-Loops & Control Statements
Data type of case labels of switch statement in C++?
Last Updated: 12 August 2021
In C++ switch statement, the expression of each case label must be an integer constant expression.For example, the following program fails in compilation.CPP /*...
read more
C Language
C-Loops & Control Statements
Interesting facts about switch statement in C
Last Updated: 16 February 2023
Prerequisite - Switch Statement in C Switch is a control statement that allows a value to change control of execution.C // Following is a simple program to demo...
read more
C Language
C++
cpp-switch
C-Loops & Control Statements
Output of C programs | Set 35 (Loops)
Last Updated: 07 September 2018
Short question based on c loops1. What will be the output of the following code?C #include stdio.hint main(){ int i = 0, j = 0; while (i5,j10) { ...
read more
C Language
C-Output
C-Loops & Control Statements
Length of a String Without Using strlen() Function in C
Last Updated: 05 December 2024
The length of a string is the number of characters in it without including the null character. C language provides the strlen() function to find the lenght of the string b...
read more
C Programs
C Language
Picked
C-Loops & Control Statements
C-String
C Examples
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 !