Independent Preparation Bank for Pakistani Computing Graduates • 100% Free • No Signup
NSCTPrep.
Home/Subjects/Problem Solving & Analytical Skills/Foundations of Problem Solving
Problem Solving & Analytical SkillsTopic #1 of 563 MCQs Available

Foundations of Problem Solving

Comprehensive question bank, step-by-step rationales, and dedicated timed quiz for Foundations of Problem Solving.

Launch Quiz Mode ↗

Foundations of Problem Solving Question Bank

Showing 63 questions of 63 with verified answers

1Multiple Choice

What is universally considered the most critical first step in systematic problem solving?

2Multiple Choice

An architect decides to split a massive smart-city software project into three independent modules: Traffic Management, Waste Management, and Power Grid. Which computational thinking concept is this?

3Multiple Choice

When designing a digital map for navigation, a developer decides not to include the exact number of trees in a park, focusing only on the roads and traffic flow. This is an example of:

4Multiple Choice

Which of the following is the best example of an "ill-defined" problem?

5Multiple Choice

A cybersecurity analyst notices that a specific sequence of failed login attempts happens exactly three seconds apart across multiple servers. Using this observation to create a firewall rule relies heavily on:

6Multiple Choice

A student forgets their 4-digit bicycle lock combination. They decide to try 0000, then 0001, then 0002, sequentially until the lock opens. What problem-solving approach is this?

7Multiple Choice

Which statement accurately describes a "Heuristic" problem-solving approach?

8Multiple Choice

In the classic problem-solving cycle (Understand → Plan → Execute → Verify), where does writing pseudocode typically belong?

9Multiple Choice

You are building a car manufacturing robot. You first design a generic robotic arm, then a generic sensor array, and later assemble them to build the final robot. This approach is called:

10Multiple Choice

A developer runs their newly written script, but the program outputs "74" instead of the expected "100". The next logical step falls under which phase of the problem-solving cycle?

11Multiple Choice

Which of the following is NOT typically considered a core pillar of Computational Thinking?

12Multiple Choice

A chess computer has only 3 seconds to make a move. Instead of calculating millions of possible future moves to the end of the game, it uses a formula to evaluate board control and piece values to make a "good enough" move. This is an application of:

1Multiple Choice

During a meeting, a client says, "The system needs to calculate monthly payroll." In problem-solving terms, this statement is best described as an identification of:

2Multiple Choice

A stakeholder specifies that the new search feature must return results in under 0.5 seconds. What type of requirement is this?

3Multiple Choice

You are writing a program that accepts a user's age. Which of the following is the best example of an "edge case" you must analyze?

4Multiple Choice

A team experiences a software bug and asks, "Why did the app crash?" → "Because the database timed out." → "Why did it time out?" → "Because an index was missing." This investigative technique is known as:

5Multiple Choice

Which of the following visual tools is commonly used to map out the potential causes of a specific problem, categorizing them into areas like People, Methods, Machines, and Materials?

6Multiple Choice

A developer builds a login system. The client rejects it because passwords are stored in plain text. The client never specifically asked for encrypted passwords. This is an example of failing to analyze:

7Multiple Choice

Which of the following is a symptom rather than a root cause?

8Multiple Choice

When analyzing a new computational problem, separating the "noise" (irrelevant background information) from the actual technical requirements is an exercise in:

9Multiple Choice

A problem statement says: "Sort a list of maximum 1,000,000 integers using less than 50MB of RAM." The "less than 50MB of RAM" part is a:

10Multiple Choice

You are tasked with analyzing a bug where a shopping cart deletes items randomly. What is the most dangerous thing a problem-solver can do during the analysis phase?

11Multiple Choice

A client says: "Make the homepage load faster." To properly analyze this problem, a developer must first:

12Multiple Choice

If a function is designed to divide two numbers A / B, which of the following is the most critical boundary case to analyze?

13Multiple Choice

During problem understanding, a developer lists: "User email, Password, and Date of Birth." These represent the system's:

14Multiple Choice

A junior programmer starts writing code immediately after reading the first sentence of a client email. Why is this a bad practice?

15Multiple Choice

Two departments in a company give you conflicting requirements for a new software tool. What is the correct analytical step to take?

16Multiple Choice

The "Black Box" concept in problem analysis refers to:

17Multiple Choice

A programmer is analyzing a sorting problem. They ask: "Are the numbers integers or decimals? Can there be duplicates? Is the list mostly sorted already?" This demonstrates a strong focus on:

18Multiple Choice

When applying the "5 Whys" technique, when do you typically stop asking "Why?"

1Multiple Choice

(Conceptual) In Boolean logic, which operator requires EVERY condition to be true in order to output TRUE? • • • •

2Multiple Choice

(Code Output) Consider the following pseudocode: A = True B = False C = True Result = (A OR

3Multiple Choice

(Scenario-Based) A hospital software allows access to patient records if the user is a "Doctor" OR if the user is a "Nurse" AND the "Shift is Active". If a Nurse tries to log in while their shift is NOT active, what happens?

4Multiple Choice

(Calculation/Math) By applying De Morgan's Law, how can you rewrite the condition NOT (Age > 18 AND Is_Citizen == True)?

5Multiple Choice

(Conceptual) In many programming languages, if the first operand in an AND expression evaluates to False, the program does not evaluate the second operand. This behavior is called:

6Multiple Choice

(Code Error / Debugging) A developer wants to execute code only if x is between 10 and 20 (inclusive). Find the error in this pseudocode: if (x >= 10 OR x <= 20) { ... }

7Multiple Choice

(Conceptual) Which logical gate/operator returns TRUE only if exactly one of its inputs is true, and the other is false?

8Multiple Choice

(Code Output) Trace this pseudocode: x = 5 if (x > 2 AND x < 10) { if (x == 5 OR x == 6) { print("Alpha") } else { print("Beta") } } else { print("Gamma") } What is printed?

9Multiple Choice

(Comparison) What is the logical difference between = and == in standard programming logic?

10Multiple Choice

(Calculation) Evaluate the following expression: (True XOR False) AND (NOT False)

11Multiple Choice

(Scenario-Based) An e-commerce system applies a discount if a user is a "Premium Member" AND their cart total is > $50. Which of the following test cases will successfully trigger the discount?

12Multiple Choice

(Code Output) Look at this logic chain: isValid = False if (NOT isValid) { isValid = NOT isValid } print(isValid)

13Multiple Choice

(Comparison) How can the nested logic block below be optimized into a single line? if (temperature > 30) { if (humidity > 80) { TurnOnAC() } }

14Multiple Choice

(Conceptual) Deductive reasoning in logic means:

15Multiple Choice

(Code Error / Debugging) A program checks if a year is a leap year. The rule is: divisible by 4, but NOT divisible by 100, UNLESS divisible by 400. What is wrong with this logic? if (year % 4 == 0 AND year % 100 == 0 AND year % 400 == 0)

16Multiple Choice

(Scenario-Based) A firewall blocks IP addresses if they are on the "Blacklist" OR if they have more than 100 failed logins, UNLESS they are on the "Whitelist". The correct logical structure is:

17Multiple Choice

(Calculation) What is the binary result of the bitwise AND operation between 1100 and 1010?

18Multiple Choice

(Code Output) What will be the final value of count? count = 0 if (True OR False) { count = count + 1 } if (True AND False) { count = count + 1 } if (NOT False) { count = count + 1 }

19Multiple Choice

(Conceptual) A "Tautology" in logic refers to a statement that is:

20Multiple Choice

(Code Error / Debugging) A developer writes: if (status == "Admin" OR "Moderator"). Why will this cause a logical error in many languages?

21Multiple Choice

(Scenario-Based) If "All servers have a firewall" is a true premise, and "Node 4 is a server" is a true premise, which deduction is logically sound?

22Multiple Choice

(Code Output) A = 10 B = 20 Result = (A <

23Multiple Choice

(Calculation) Evaluate: NOT ( (True AND False) OR (False OR True) )

24Multiple Choice

(Code Error / Debugging) You want a loop to continue running as long as the user has NOT pressed the "Exit" key (which sets exitKey = True) AND the timer is greater than zero. Which is the correct WHILE condition?

25Multiple Choice

(Conceptual) In propositional logic, a "Contradiction" is:

1Multiple Choice

(Conceptual) By definition, an algorithm must possess which of the following characteristics?

2Multiple Choice

(Conceptual) In a standard flowchart, which shape is used to represent a decision point (e.g., an IF statement)?

3Multiple Choice

(Code Output) Trace the following loop: sum = 0 for i from 1 to 3: sum = sum + i print(sum)

4Multiple Choice

(Debugging) A developer wants to print the numbers 1 through 5. They write: i = 1 while (i < 5): print(i) i = i + 1 What is the logical error in this code?

5Multiple Choice

(Comparison) What is the primary difference between a WHILE loop and a DO-WHILE loop?

6Multiple Choice

(Code Output) What will this pseudocode print? x = 10 while (x > 5): x = x - 2 print(x)

7Multiple Choice

(Scenario-Based) A program must read a file line by line until it reaches the end of the file (EOF). The file length is unknown beforehand. Which control structure is the most appropriate?

8Multiple Choice

(Calculation) How many times will the word "Hello" be printed in the following nested loop? for i from 1 to 4: for j from 1 to 3: print("Hello")