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?
کون سا لوپ ان حالات میں استعمال کرنے کے لئے موزوں ہے جہاں پروگرامر کو معلوم نہیں ہوتا ہے کہ لوپ کے جسم کو کس وقت کی تعداد میں پھانسی دی جائے گی؟
- Nested loop
- Do-while loop
- For loop
- None of these
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.
Related MCQs
ڈی ایم اے کا مطلب کیا ہے؟
- Direct Memory Access
- Direct Module Access
- Direct Memory Allocation
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
ڈی او ایس کا مطلب کیا ہے؟
- Digital operating system
- Disk operation system
- Disk operating system
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
کسی مخصوص کام کو انجام دینے کے لیے کمپیوٹر کو دی گئی ہدایات کس کا مجموعہ ہے۔
- Monitor
- Hardware
- software
- Printer
اس سوال کو وضاحت کے ساتھ پڑھیں
لائٹ قلم کیا ہے؟
- Mechanical Input device
- Optical input device
- Electronic input device
- Optical output device
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
ایک (1) بائٹ کس کے برابر ہے؟
- 4 bits
- 8 bits
- 12 bits
- None of these