× Didn't find what you were looking for? Ask a question
  
  
Top Posters
Since Sunday
12
s
5
t
5
s
5
9
5
g
5
h
5
l
5
o
5
f
5
d
5
r
4
New Topic  
DePeet DePeet
wrote...
Posts: 338
Rep: 0 0
5 years ago
The following for loop is an infinite loop::
for(int j = 0; j < 1000;) i++;
Read 30 times
1 Reply
Replies
Answer verified by a subject expert
StingerStinger
wrote...
Posts: 310
Rep: 4 0
5 years ago
Sign in or Sign up in seconds to unlock everything for free
T
This loop initializes j to 0 and compares it to 1000, but does not alter j after each loop iteration.  In reality, the loop will terminate with a run-time error eventually once i becomes too large to store in memory, but logically, this is an infinite loop.
1

Related Topics

DePeet Author
wrote...

5 years ago
You make an excellent tutor!
wrote...

Yesterday
This calls for a celebration Person Raising Both Hands in Celebration
wrote...

2 hours ago
Thanks for your help!!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  281 People Browsing
 222 Signed Up Today
Related Images
  
 183
  
 206
  
 59
Your Opinion
Who's your favorite biologist?
Votes: 431