What is difference between for loop and while loop?
please explain that what is difference between for loop and while loop,
please explain in detail
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manikandan MurugesanRank #300 · 8.4K reputationPosted Aug 7, 2017, 8:11 AM EDT
1)Initialization, 2)Condition, 3)Increment/decrement.
i.e. for(i=1;i<10;i++)
Anil JhaRank #1,988 · 733 reputationPosted Aug 7, 2017, 5:57 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 7, 2017, 8:27 AM EDT
Puneet KankarRank #446 · 5.6K reputationPosted Aug 7, 2017, 8:38 AM EDT
Saravanan PonnusamyRank #634 · 3.8K reputationPosted Aug 7, 2017, 6:05 PM EDT
Guest UserRank #2,002 · 726 reputationPosted Aug 7, 2017, 8:00 PM EDT
Urdu Hindi3 reputationPosted Aug 7, 2017, 8:24 PM EDT