Does The statements within a while loop execute at least once?

1 answer

Answer

1071933

2026-08-12 11:15

+ Follow

No. If the loop condition is not satisfied then the loop would not be executed even once.

while(condition)

{

.....

/statements

.....

}

here,when the condition is true then the statements will be executed. Otherwise they would be skipped without being executed.

Only for do.. while loops this execution at least once holds good.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.