A. You need to specify the start value and a terminating condition. For example: the loop start with $x = 3 and ends when $x is less than 10
B. They are exactly the same a while loops.
hint: google for loops vs while loops
C. On each iteration of the for loop, the indexing variable usually, $i, if always incremented by 1
D. $i++ means $i = $i + 1
B. It's false. Please, read hint.
C. It's false too, because in third part of definition of the for loop we can define an increment anyway we like. For
examle: $x+=3 or $x*=2;
D. It's true. $x++ equal $x+=1 and equal $x=$x+1.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!