answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is an infinite loop an example of a syntax error?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

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

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


How do you fix an infinite loop?

It comes from its name: it doesn't terminate, the user have to interrupt the program-run (in the worst case: power off the computer).The infinite loop is also used to program loops with non-easily-deterministically end-of-loop conditions.You write an infinite loop, such as for (;;) {statements}, and break out of the loop with the break statement when ready to terminate.


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


A program with a loop that never ends is called an?

Infinite loop.

Related questions

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

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


How do you write a infinite for loop?

for(; ;);..this will do for an infinite loop


What the syntax of for loop in c?

for (<exp1>; <exp2>; <exp3>) <statement> exp1 and exp3 are optional; statement can be null-statement or block-statement. Correction: All expressions are optional. An infinite loop has no expressions: for(;;);


What is the definition and syntax of for next loops?

loop within in a loop is called for next loop


Is an infinete loop an example of syntax error?

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.


Which company has its headquarters at One Infinite Loop?

Apple Computers in Cupertino, California. The name, of course, is a pun on the use of "loop" to describe a circular road and a part of a computer program that is repeated; an infinite loop is a loop that's executed endlessly due to an error in the program's logic such that an end condition never occurs.


How do you fix an infinite loop?

It comes from its name: it doesn't terminate, the user have to interrupt the program-run (in the worst case: power off the computer).The infinite loop is also used to program loops with non-easily-deterministically end-of-loop conditions.You write an infinite loop, such as for (;;) {statements}, and break out of the loop with the break statement when ready to terminate.


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


How do you use a for loop?

The FOR loop syntax is as follows for(counter initiation/declaration; condition; counter increment){ code.... } example: for(int i = 0; i < 10; i++){ System.out.println(i); } In the above code the variable i is the loop counter. We have initiated in the first part of the for loop. The second part is the condition. The loop would be executed until the value of i is less than 10. The third is the loop increment to ensure that the value of i would not remain the same causing an infinite loop. for(int i = 0; i < 10; ){ System.out.println(i); } The above for loop usage is an infinite loop because the value of i would never change and the loop would go on forever. for(int i = 0; i < 10; ){ System.out.println(i); i++; } You can even opt to have the loop counter incremented inside the loop construct. This would make it similar to a while loop. but anyways the purpose of the increment remains the same.


What is a Redirect Loop error and why am I getting one when I try to view answers to my questions on Answers dot com?

A redirect loop is when a website redirects you to a site which then redirects you back to the original site, creating an infinite loop. Browsers should stop redirecting after a certain number of hops and display an error message.


Syntax of for loop in c language?

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