Find the error in the code segments, and explain how to correct it:
```
i = 1;
2 while (i <= 10);
3 ++i;
4 }
```
Error: The semicolon after the while header causes an infinite loop, and there’s a missing left brace.
Correction: Replace the semicolon by a {, or remove both the ; and the }.
Computer Science & Information Technology
You might also like to view...
Brightness is the difference in colors in a graphic
Indicate whether the statement is true or false
Computer Science & Information Technology
Which of the following shells is the most basic shell available on all UNIX systems?
A. tsch B. Bourne shell C. C shell D. Korn shell
Computer Science & Information Technology