answersLogoWhite

0

Yes. Loops need to have a termination argument or else the program will continue running until it runs out of memory and then crash.

A termination argument is some guarantee that the program will eventually end.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Is an infinite loop an example of a syntax error?

No. A syntax error is a statement that fails to compile. Infinite loops are simply loops for which the number of iterations is unknown. However, all loops, whether counted loops or infinite loops, must have a reachable exit condition. If a loop does not have a reachable exit condition then it is a logic error, not a syntax error.


What is the definition and syntax of for next loops?

loop within in a loop is called for next loop


List two types of errors that can lead to an infinite loop?

Quite simply: a circular function in the programming, not going anywhere.


What is the syntax for writing a loop in pseudo code?

The syntax for writing a loop in pseudo code typically involves using keywords like "for", "while", or "do-while" to indicate the type of loop, followed by the loop condition and the code block to be executed within the loop.


Difference between break and continue statements in wml?

Break statements:-its terminates the current while or for loop and continue the program execution from the statement following the terminated.NOTE:-note that it is wmlscript syntax error to use the break statement outside of while or a for statements.example;Breakstatement:Break;Continue statement:-this statement terminate execution of a block of statementin while or for loop and continues execution of loop with the next iteration.note that the continue statement does not terminate the execution of loop and also is wmlscript syntax error to use the break statement outside of while or a for statements.-> in while loop, it jumps back to the condition.-> in for loop,it jumpsto the update expression.syntax:continuestatement:continue;


Difference between syntax error and runtime error?

Syntax error can be found during compilation. Runtime error can be found only when you are trying to execute your program. Syntax errors are those which are caused by incorrect usage of the programming language. All programming language compilers are designed to detect and report such errors done by the programmer Runtime errors are those which are caused by incorrect usage of programming logic. for example a runtime divide method will throw a run time error if the divisor is '0' because numerically you cannot divide a number by 0


Syntax of for loop in c language?

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


What are Semantic errors in a programming language?

Semantic or Syntax errors are errors in the way a programmer has written his code. The code does not conform to language standards and is incorrect. Ex: for(int i = 0, i++, i<10) { } The above is a syntactically incorrect declaration of a for loop in Java. The compiler would not let you compile this code successfully.


Is it possible to use a for loop in place of a while loop?

Yes. while loop consist of only condition statement to make for loop look as while loop we can use syntax shown below: for(;condition;) eg: for(;i<=n;)


What is the difference between do while and for loop?

do { //statements }while(condition); The statements inside the block get executed at-least once, no matter what condition you have placed. Only from the 2nd time the condition is checked, simply because the condition is at the last. for(initialization; condition; updation) { //statements } Here the statements don't get executed even once if the condition fails initially. The condition is at the entry itself.


How do you use if statement syntax in a for loop?

You can use any number of if staments within a for-loop, eg: for (i=0; i<10; ++i) { if (i=1) printf ("%d=1\n",i); }


What are while loop in vb.net?

The while loop in vb.net uses the syntax form which provides a way to continue iterating while one or more conditions are true.