• Call Us: +91 9437911966
  • Email Us: info@studentstutorial.com
  • Home
  • C Examples
  • Server Side
    • PHP
    • Java
    • CodeIgniter
    • Laravel
    • JSP
    • JDBC
  • Frontend
    • HTML
    • CSS
    • Javascript
    • jQuery
    • AJAX
    • FPDF
    • TCPDF
  • APP & DB
    • Android
    • Cordova
    • SQL
    • Oracle
  • Project
C Tutorial C Introduction C Characteristic C Comments C Operator C Assign Operator C Arithmetic Oper.. C Logical Operator C Modulus Operator C Variable C Initialise Variable C Print F C Translators C Programming C Control Flow C If Else Statement C Nested If Else C Loops C While Loops C For Loops C Do While C Nested Loops

C Nested Loop

  • Students Tutorial
  • 08 jun 2020
   

It is a procedure of constructing a loop body.

When the repetitions are required then go for loops, if complete loop body required to repeat n no. of times then go for nested loop.

In c prog.lang, we can place up to 255 nested blocks.

Syntax:

Assignment 1;
While (condition1)

{

	Statement1;

  Statement2;

   - - - - - -

Assignment 2;

 While (condition2)

	 {

	 Statement1;

	 Statement2;

	  - - - - -
  
 Index

	 }

   Inc/dec;

	  }
	

When we are working with nested loops, always execution is started from the outer loop condition i.e. condition1.

When the outer loop condition is true, then control will pass to the outer loop body.

In order to execute the outer loop body; if any while statements occur those are called inner loops.

When the inner loop occurs, we are required to check inner loop condition i.e. condition 2.

If inner loop condition is true then control will pass within the inner loop body and until the inner loop condition becomes false, body is repeated n no. of times, When inner loop condition is false then control will pass to outer loop and until the outer loop condition becomes false body is repeated n no. of times.

Student Tutorial is a online tutorial for web design and development. Here you can find easy example and explanation for each tutorial.
Copyright © 2016-2025 Student Tutorial

Server Side

  • PHP
  • Java
  • CodeIgniter
  • Laravel
  • JSP
  • JDBC

Frontend

  • HTML
  • CSS
  • Javascript
  • jQuery
  • AJAX
  • FPDF

App & Database

  • Android
  • Cordova
  • SQL
  • Oracle