• Call Us : 03082533000 (WhatsApp)
  • Email Us : TestPointpk.com@gmail.com
Sticky Note
What is the time complexity of a C++ program with a nested for-loop?
  1. 0(N²)
  2. O(N)
  3. O(log N)
  4. None of these
Explanation

In a nested for-loop, the inner loop executes N times for each iteration of the outer loop.

This results in a total of N × N = N² iterations, making the time complexity O(N²).

Related MCQs

فِشنگ کیا ہے؟
  1. A method of encrypting data for security
  2. Cybercrime involving fraudulent emails or messages to obtain sensitive information
  3. A technique to speed up network connections
  4. A way to block access to websites
اس سوال کو وضاحت کے ساتھ پڑھیں

کمپیوٹر نیٹ ورکس میں فائر وال کا بنیادی کام کیا ہے؟
  1. To prevent/block unauthorized access
  2. To block viruses
  3. To speed up network traffic
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

فارن کی کیا ہوتی ہے؟
  1. A key that uniquely identifies a record in the same table
  2. A key used to delete records
  3. A field in one table that refers to the primary key of another table
  4. A password for database security
اس سوال کو وضاحت کے ساتھ پڑھیں

کمپائلر کیا ہے؟
  1. Name given to the computer operator
  2. Translator of source program to object / Translator of high-level program to machine
  3. Part of the digital machine to store the information
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

کیش میموری کہاں موجود ہوتی ہے؟
  1. CPU
  2. Software
  3. Window
  4. None of these
اس سوال کو وضاحت کے ساتھ پڑھیں

All Rights Reserved © TestPointpk.com