A community for students.
Here's the question you clicked on:
 0 viewing
kanigayan
 3 years ago
The following forloop is an infinite loop.
for (int j = 0; j < 1000; i++ ) is this true or false
kanigayan
 3 years ago
The following forloop is an infinite loop. for (int j = 0; j < 1000; i++ ) is this true or false

This Question is Closed

Shadowys
 3 years ago
Best ResponseYou've already chosen the best response.5well, yes, unless that i there is a typo.

kanigayan
 3 years ago
Best ResponseYou've already chosen the best response.0it's false no because this loop will print 999 times , not infinite time no

Shadowys
 3 years ago
Best ResponseYou've already chosen the best response.5but it's i that increases, not j, right?

kanigayan
 3 years ago
Best ResponseYou've already chosen the best response.0umm not increase no cause it given limit no, when it is infinite j>1000 and j=1000

Shadowys
 3 years ago
Best ResponseYou've already chosen the best response.5oh...so that i is a typo then. for (int j = 0; j < 1000; i++ ) <infinite for (int j = 0; j < 1000; j++ ) <not infinite

kanigayan
 3 years ago
Best ResponseYou've already chosen the best response.0okay then The following forloop is an infinite loop. for (int j = 0; j < 1000; i++ ) false no

kanigayan
 3 years ago
Best ResponseYou've already chosen the best response.0beacuse it is not infinite loop no

Shadowys
 3 years ago
Best ResponseYou've already chosen the best response.5(int j = 0; j < 1000; j++ ) is not an infinite loop. yup. look closely though... ^ <this part here

Shadowys
 3 years ago
Best ResponseYou've already chosen the best response.5you're welcome :) though you could just try to write a program and see if it works lol :P
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.