• Call Us : 03082533000 (WhatsApp)
  • Email Us : TestPointpk.com@gmail.com
Sticky Note
Which loop is preferred to use when the programmer knows in advance how many times the body of the loop will be executed?
جب پروگرامر کو پہلے ہی معلوم ہوتا ہے کہ لوپ کے جسم کو کتنی بار عمل میں لایا جائے گا تو کس لوپ کو استعمال کرنے کو ترجیح دی جاتی ہے؟
  1. While
  2. For
  3. Do-while
  4. None of these
Explanation

The for loop is ideal when the number of iterations is known beforehand.

It allows initializing, testing, and updating the loop variable in a single line.

Related MCQs

سب سے زیادہ قابلِ اعتماد نیٹ ورک ٹوپولوجی کون سی ہے؟
  1. Star topology
  2. Ring topology
  3. Mesh topology
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

ویب سائٹ کے پہلے صفحے کو کیا کہا جاتا ہے؟
  1. First Page
  2. New Page
  3. Screen Page
  4. Home Page
اس سوال کو وضاحت کے ساتھ پڑھیں

میلویئر سافٹ ویئر کیا ہے؟
  1. A type of software designed to improve computer performance
  2. Software that protects against viruses and threats
  3. Malicious software designed to harm or exploit systems
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

کالم اور قطار کے ملنے کی جگہ کو کیا کہتے ہیں؟
  1. Schema
  2. Cell
  3. Table
  4. Data
اس سوال کو وضاحت کے ساتھ پڑھیں

کون سی میموری سب سے تیز ہوتی ہے اور عام طور پر سی پی یو کے اندر موجود ہوتی ہے؟
  1. Main Memory
  2. SRAM
  3. Cache Memory
  4. DRAM
اس سوال کو وضاحت کے ساتھ پڑھیں

All Rights Reserved © TestPointpk.com