Free Practice Quiz Question List

1 Programming Fundamentals and Problem Solving Online Quiz Questions

Use this free practice quiz with 20 questions to review 1 Programming Fundamentals and Problem Solving, test your knowledge, and prepare for your next test or exam.

20 questions
01
Choose one
1 point

Which statement about a WHILE loop is correct?

  1. A

    A WHILE loop always executes its body at least once.

  2. B

    A WHILE loop can become infinite if its condition never becomes false.

  3. C

    A WHILE loop can only process numeric values.

  4. D

    A WHILE loop automatically stops after three iterations.

02
Choose one
1 point

What is the primary role of a class in object-oriented programming?

  1. A

    A class is a value stored in an array.

  2. B

    A class is a loop that creates repeated output.

  3. C

    A class is a blueprint used to create objects.

  4. D

    A class is always a single object with no instances.

03
Choose one
1 point

A grade-report program is divided into separate tasks for reading scores, validating scores, calculating an average, assigning a grade, and displaying the report. Which problem-solving strategy is being used?

  1. A

    Decomposition

  2. B

    Inheritance

  3. C

    Concatenation

  4. D

    Indexing

04
Choose all
1 point

Select all statements that accurately describe pseudocode.

  1. A

    It helps focus on algorithmic logic before language-specific syntax.

  2. B

    It must compile and run in a particular programming language.

  3. C

    It can communicate an algorithm without requiring exact language syntax.

  4. D

    It guarantees that the implemented program contains no errors.

05
Choose all
1 point

Which two are benefits of using functions? Select all correct choices.

  1. A

    It makes every variable global.

  2. B

    It can reduce duplicated code.

  3. C

    It gives a coherent task a meaningful name.

  4. D

    It guarantees that testing is unnecessary.

06
True or false
1 point

A collection-oriented FOR loop is suitable for applying an operation to every item in a collection.

  1. A

    True

  2. B

    False

07
True or false
1 point

An array is generally the best choice when every value needs a meaningful named property rather than a position.

  1. A

    True

  2. B

    False

08
Written response
1 point

What problem-solving technique divides a complicated task into smaller, manageable subtasks?

09
Written response
1 point

What asymptotic notation describes the growth of a search that may examine every item in a list of size n?

10
Fill in the blank
1 point

Complete the statements. An algorithm must eventually stop; this property is called . The results produced by an algorithm are its .

11
Fill in the blank
1 point

An invalid array index or division by zero causes a problem while the program is executing. This is a .

12
Open ended
1 point

A program performs these steps: it reads a number, checks whether number MOD 2 = 0, displays "Even" when the condition is true, and displays "Odd" otherwise. Explain how the program determines whether the number is even or odd. Include the role of MOD and describe what happens in both branches.

13
Choose one
1 point

A program must search a large, sorted list efficiently. Which approach is most appropriate because it repeatedly divides the remaining search range in half?

  1. A

    A linear search through an unsorted list

  2. B

    A loop that visits every array element

  3. C

    A sorting operation followed by no search

  4. D

    A binary search on a sorted list

14
Choose one
1 point

Which statement best describes the scope of a local variable?

  1. A

    It is accessible only within the function or block where it is declared.

  2. B

    It is automatically accessible throughout the entire program.

  3. C

    It can never be modified after declaration.

  4. D

    It must always be stored in an array.

15
Choose one
1 point

What value does count have after these statements execute in order? count ← 0; count ← count + 1

  1. A

    0

  2. B

    2

  3. C

    1

  4. D

    The value is undefined

16
Choose one
1 point

Which requirement of an algorithm means that the process must eventually stop?

  1. A

    It must use a specific programming language.

  2. B

    It must eventually stop.

  3. C

    It must always use a loop.

  4. D

    It must accept exactly two inputs.

17
True or false
1 point

A REPEAT...UNTIL loop executes its body at least once, even if its stopping condition is already satisfied before the first iteration.

  1. A

    True

  2. B

    False

18
Choose one
1 point

A grade-report program has separate methods for reading scores, validating scores, calculating an average, assigning a letter grade, and displaying the report. Which problem-solving strategy is being applied?

  1. A

    Repeating the same instruction until a condition changes

  2. B

    Choosing between branches based on a Boolean expression

  3. C

    Dividing a complicated task into manageable subtasks

  4. D

    Comparing two algorithms by their memory usage

19
Written response
1 point

What programming problem-solving concept describes dividing a complicated task into smaller, manageable subtasks?

20
Written response
1 point

What object-oriented programming concept allows code to use a general type while the actual object determines which overridden method implementation runs?