Which loop is suitable to use in situations where the programmer does not know the number of time the body of the loop will be executed?
Which loop is suitable to use in situations where the programmer does not know the number of time the body of the loop will be executed?
کون سا لوپ ان حالات میں استعمال کرنے کے لئے موزوں ہے جہاں پروگرامر کو معلوم نہیں ہوتا ہے کہ لوپ کے جسم کو کس وقت کی تعداد میں پھانسی دی جائے گی؟
Explanation
The do-while loop is useful when the loop must run at least once, even if the condition is false initially.
It's suitable when the number of iterations is not known in advance and depends on runtime conditions.