Cognizant interview question

Main difference between for and while loop.