answersLogoWhite

0

A nested loop is when you have a loop in a loop.

So this code:

for(int i = 0; i < 3; i++)

{

for(int j = 0; j < 3; j++)

{

cout << "i: " << i << "j: " << j << endl;

}

}

will output 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is meant by while looping?

A "While" loop is a part of computer programming. The logic is "while this condition is true, do the following commands and repeat". By default this will repeat forever creating a "loop" in logic. To stop looping you have to include a command that will change the original condition inside the loop.


What does nial mean?

It is a high-level programming language: Nested Interactive Array Language.


What is the definition of 'nested' in C programming?

In C a structure within a structure is called nested. For example, you can embed a while loop in another while loop or for loop in a for loop or an if statement in another if statement.


What is difference between select Case statement and nested loop in c programming in UNIX?

UNIX has no bearing on the C language; it is cross-platform. There is no select/case in C, you probably meant switch/case. However, a switch/case is a conditional jump while a nested loop is a loop within a loop. Besides the C language they have nothing in common with each other.


What is nesting in C programming?

Nesting can be a very handy tool in C++, but should be avoided if possible.C++ gives us If statements, For loops and many other things. These can be nested. For example:A nested If statement://outer if statementIf( this is true ){//nested if statementif( this is also true ){//do something}else{//do something else}}


What is meant by XMLHttpRequest?

web programming


What is meant by interpreter in programming languages?

An interpreter is programme that translates a high-level programming..


Is there any difference between programming structures and having a structured program?

In a structured program, any structure can be nested within another structure.


What is meant by programming paradigms?

Programming paradigmsParadigm refers to a way of doing something.Programming paradigm refers to an approach to orstyle of programming.


What is looping statement?

What is looping statement?


What is meant by programme?

A programmer that has been to the universal school of programming to learn all possible programming languages.


What is nested logic?

In Nested Logic a Logic is contained within a Logic. If the Outer Logic is TRUE then the internal Logic is executed. Nested IF, Nested For, Nested While, e.t.c are some examples of Nested Logic in Modern Computer Languages.