0% found this document useful (0 votes)
97 views2 pages

Nested Loop in C Programming

A nested loop in C contains a for or while loop within the block of another for or while loop. The syntax for a nested for loop includes an outer for loop that contains an inner for loop within its code block, with each loop having its own initialization, condition, and increment/decrement. Similarly, a nested while loop contains a while loop within the code block of another while loop.

Uploaded by

Saheli Sarkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views2 pages

Nested Loop in C Programming

A nested loop in C contains a for or while loop within the block of another for or while loop. The syntax for a nested for loop includes an outer for loop that contains an inner for loop within its code block, with each loop having its own initialization, condition, and increment/decrement. Similarly, a nested while loop contains a while loop within the code block of another while loop.

Uploaded by

Saheli Sarkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

NESTED LOOP IN C

Nested for loop :-


Syntax: -
for (initialization; condition;
increment/decrement)

{for ( initialization; condition;


increment/decrement ) {

// block of statement(s) of inside loop


}

// block of statement(s) of outer loop


}
Nested While loop:-
Syntax:-

You might also like