The following for-loop is an infinite loop. for (int j = 0; j < 1000; i++ ) is this true or false
well, yes, unless that i there is a typo.
it's false no because this loop will print 999 times , not infinite time no
but it's i that increases, not j, right?
umm not increase no cause it given limit no, when it is infinite j>1000 and j=1000
oh...so that i is a typo then. for (int j = 0; j < 1000; i++ ) <--infinite for (int j = 0; j < 1000; j++ ) <--not infinite
okay then The following for-loop is an infinite loop. for (int j = 0; j < 1000; i++ ) false no
beacuse it is not infinite loop no
(int j = 0; j < 1000; j++ ) is not an infinite loop. yup. look closely though... ^ <--this part here
okay thanx :)
you're welcome :) though you could just try to write a program and see if it works lol :P
Join our real-time social learning platform and learn together with your friends!