Pergunta de entrevista da empresa Cognizant

Deference between for loop and while loop