1.

What are the three components of a for-loop?(a) initialization, conditional, increment/decrement(b) conditional, memory allocation, memory deletion(c) reset, increment, conditional(d) reset, increment/decrement, memory allocationThis question was addressed to me in unit test.I'd like to ask this question from Looping topic in portion Arduino Programming of Arduino

Answer»

Correct ANSWER is (a) initialization, conditional, increment/decrement

For explanation I WOULD say: The for-loop structure is an entry controlled looping structure. It is GENERALLY used when there is a clear starting point and ENDING point to the loop. Unlike the while loop in which the ending point may or may not be INCLUDED in the loop structure.



Discussion

No Comment Found

Related InterviewSolutions