answersLogoWhite

0

You mean a loop that has no exit condition. The end result is undefined behaviour. The program may loop indefinitely until manually ejected from memory (forcibly terminated), or it may crash through a lack of resources. Worst case: if the loop doesn't periodically allow for message processing within a multi-threaded environment, the system will be sluggish or unresponsive, possibly forcing a reboot.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

When a VBScript loop control variable is not altered during loop execution what kind of loop may result?

An infinite loop.


What are the components of loop?

a loop consist of data initialization;test condition;updation; example a for loop for(int a=1;a<5;a++) the loop will be executed 5 times four positives result and the last test condition will be failed and the loop will be exited there are many loops some of them are while loop,do...while loop,for loop,maybe more...... do while is an exit check loop and while and for are entry check loop.


What happens if the controlling expression in a do while loop is initially false?

The do-while loop is designed specifically for such situations, where you want the loop to execute once irrespective of the loop expression. The loop would execute once and then terminate because, the loop controlling expression is false. If you note the syntax properly do { ... ... ... } while(condition) The condition is executed only after one iteration of the loop and hence the code would execute once irrespective of the loop expression result.


Why you need a for loop when you have already while loop or do while loop?

We need a for loop because the while and do-while loops do not make use of a control variable. Although you can implement a counter inside a while or do-while loop, the use of a control variable is not as self-evident as it is in a for loop. Aside from the use of a control variable, a for loop is largely the same as a while loop. However, it is quite different to a do-while loop, which always executes at least one iteration of the loop before evaluating the conditional expression. In a for and while loop, the conditional expression is always evaluated before entering the loop, which may result in the loop not executing at all.


Find factorial at given number using do while loop?

Actually, a for loop is more appropriate in this case. With while, it would be something like the following pseudocode - adapt to your favorite programming language:function factorial(n)result = 1factor = 1while factor


If you stopped the magnet midway through the loop what would happen?

The magnetic field generated by the magnet would also stop, causing the induced current in the loop to cease. This would result in a decrease in electromagnetic induction and the loop would have no current running through it.


If you suspend a circular loop of wire carrying current by a thread how will you expect it to align itself?

The circular loop of wire carrying current will align itself in a plane perpendicular to the direction of the magnetic field created by the current flowing through the loop. This is a result of the magnetic force exerted on the current-carrying loop in the presence of the magnetic field.


When loops are nested does one loop have to end before the other begins?

If one loop ends before the next begins then they are not nested at all -- they are completely independent. To be nested, one loop must contain the other loop in its entirety. That is, the inner, nested loop must start and end within the outer, containing loop. Nested loop example (in C++): for( int x = 0; x < 10; ++x ) // outer loop { for( int y = 0; y < 10; ++y ) // inner loop (nested loop) { printf( "%d x %d = %d\r\n", x, y, x*y ); } // end of inner loop } // end of outer loop


What are the release dates for Loop Loop Loop Loop - 2014?

Loop Loop Loop Loop - 2014 was released on: USA: 15 February 2014


How you find it by for loop a factorial of a number?

long nfact (long n) { long result; if (n < 2) return 1; for (result = n; n > 1; --n, result *= n); /* only works up to n==12 */ return result; }


What is a nested loop in java?

A nested loop is a (inner) loop that appears in the loop body of another (outer) loop. The inner or outer loop can be any type: while, do while, or for. For example, the inner loop can be a while loop while an outer loop can be a for loop.


Write a algorithm for multiplication tabel for an integer?

Algorithm: 1. From the user collect the integer whose table is required 2. Use a loop with loop counter starting with 0x01 and ends till the table value is required 3. start multiplication the input number with the loop variable and print the result.