• Call Us : 03082533000 (WhatsApp)
  • Email Us : TestPointpk.com@gmail.com
Sticky Note
Determine the output of the program: int x = 0; while (x < 5) { x += 2; } cout << x;
  1. 4
  2. 5
  3. 6
  4. 7
Explanation
  1. Initial value: x = 0
  2. Loop runs while x < 5

Iterations:

  • 1st: x = 0 + 2 = 2
  • 2nd: x = 2 + 2 = 4
  • 3rd: x = 4 + 2 = 6

  1. Now x = 6, condition x < 5 becomes false, loop stops.
  2. Final value printed is 6.

Related MCQs

پہلی خاتون کمپیوٹر پروگرامر کون تھیں؟
  1. Ada Lovelace
  2. Grace Hopper
  3. Katherine Johnson
  4. Margaret Hamilton
اس سوال کو وضاحت کے ساتھ پڑھیں

ہینڈ ہیلڈ کمپیوٹر سے کیا مراد ہے؟
  1. Can be held and operated in the hand
  2. Requires a large room
  3. Is used only for scientific research
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

پرل پروگرامنگ زبان کس نے تیار کی؟
  1. Dennis Ritchie
  2. James Gosling
  3. Larry Wall
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

وہ زبان جسے کمپیوٹر سمجھ اور چلا سکتا ہے۔ وہ کیا کہلاتی ہے؟
  1. Machine language
  2. Application software
  3. System program
  4. All of the above
اس سوال کو وضاحت کے ساتھ پڑھیں

کسی ایک فرد کے استعمال کے لیے بنایا گیا چھوٹا کمپیوٹر کیا کہلاتا ہے؟
  1. Mainframe computer
  2. Supercomputer
  3. Personal computer
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

All Rights Reserved © TestPointpk.com