M.KOMAIL "i" in that code is acting as counter. Because the condition that you have specified in while loop is always true so your loop should run forever
To counter that we are evaluating "i" inside the loop (when i becomes greater or equal to 5, then the loop terminates
If it's still not clear then do let me know I will try to make it more clear
M.Komail#here i is the infinite loop...it never stops..because the condition never fails. As 5is always equal to 5...and i is the counter variable used..it just used to increment the loop..aiding the loop to continue till the condition fails..but it never happens here..becaz it is an infinite loop by default whose condition never fails.