Computer And Information Technology: Quiz!

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Lancerabago
L
Lancerabago
Community Contributor
Quizzes Created: 1 | Total Attempts: 686
Questions: 20 | Attempts: 687

SettingsSettingsSettings
Computer And Information Technology: Quiz! - Quiz

.


Questions and Answers
  • 1. 

    The structure that allows you to write one set of instructions that operates on multiple, separate sets of data is the _____.

    • A.

      Loop

    • B.

      Sequence

    • C.

      Selection

    • D.

      Case

    Correct Answer
    A. Loop
    Explanation
    A loop is a programming structure that allows you to repeat a set of instructions multiple times. It is used when you want to perform the same operations on different sets of data. By using a loop, you can write a single set of instructions and apply it to multiple sets of data, making your code more efficient and concise. Therefore, a loop is the correct answer for this question.

    Rate this question:

  • 2. 

    Every structured loop _____.

    • A.

      Has one entry point

    • B.

      Has two exit points

    • C.

      Refers to a counter that increases on each pass through the loop

    • D.

      Contains a body that must execute at least one time

    Correct Answer
    A. Has one entry point
    Explanation
    Every structured loop has one entry point. This means that there is only one point in the loop where the program flow enters the loop and starts executing the loop statements. Once the loop is entered, the program continues to execute the loop statements until a certain condition is met, causing the program flow to exit the loop. Therefore, a structured loop always has a single entry point.

    Rate this question:

  • 3. 

    Which of the following is not a step that must occur with every correctly working loop?

    • A.

      Set the loop control value equal to a sentinel during each iteration.

    • B.

      Initialize a loop control variable before the loop starts.

    • C.

      Compare the loop control value to a sentinel during each iteration.

    • D.

      Alter the loop control variable during each iteration.

    Correct Answer
    A. Set the loop control value equal to a sentinel during each iteration.
    Explanation
    Setting the loop control value equal to a sentinel during each iteration is not a step that must occur with every correctly working loop. A sentinel value is typically used to indicate the end of a loop, but it is not necessary for every loop. The other three steps - initializing a loop control variable before the loop starts, comparing the loop control value to a sentinel during each iteration, and altering the loop control variable during each iteration - are commonly required for loops to function correctly.

    Rate this question:

  • 4. 

    The statements executed within a loop are known collectively as the _____.

    • A.

      Loop body

    • B.

      Loop controls

    • C.

      Sequences

    • D.

      Sentinels

    Correct Answer
    A. Loop body
    Explanation
    The loop body refers to the statements that are executed within a loop. It is the block of code that is repeatedly executed until the loop condition becomes false. The loop body contains the instructions or actions that need to be performed repeatedly, allowing for repetitive tasks or computations to be carried out efficiently.

    Rate this question:

  • 5. 

    A counter keeps track of _____.

    • A.

      The number of times an event has occurred

    • B.

      The number of machine cycles required by a segment of a program

    • C.

      The number of loop structures within a program

    • D.

      The number of times software has been revised

    Correct Answer
    A. The number of times an event has occurred
    Explanation
    A counter keeps track of the number of times an event has occurred. This means that it is used to count and keep a record of how many times a specific event or action has happened. Counters are commonly used in programming and electronics to monitor and control various processes and events. They are useful for tasks such as counting the number of button presses, tracking the frequency of events, or measuring the occurrences of certain actions.

    Rate this question:

  • 6. 

    Adding 1 to a variable is also called _____ it.

    • A.

      Incrementing

    • B.

      Decrementing

    • C.

      Resetting

    • D.

      Digesting

    Correct Answer
    A. Incrementing
    Explanation
    Incrementing means increasing the value of a variable by a specific amount, usually by adding 1. In this context, adding 1 to a variable is referred to as incrementing it. This operation is commonly used in programming to update the value of a variable in a loop or to count occurrences.

    Rate this question:

  • 7. 

    Which of the following is an indefinite loop?

    • A.

      A loop that follows a prompt that asks a user how many repetitions to make and uses that value to control the loop

    • B.

      A loop that executes exactly 10 times

    • C.

      Both of the above

    • D.

      None of the above

    Correct Answer
    A. A loop that follows a prompt that asks a user how many repetitions to make and uses that value to control the loop
    Explanation
    An indefinite loop is a loop that does not have a predetermined number of iterations. It continues to execute until a certain condition is met. In this case, the loop that follows a prompt asking the user how many repetitions to make and uses that value to control the loop is an indefinite loop because the number of repetitions is determined by the user's input, not a fixed number. Therefore, it can execute any number of times depending on the user's input.

    Rate this question:

  • 8. 

    Which of the following is a definite loop?

    • A.

      A loop that executes 1000 times

    • B.

      A loop that executes as long as a user continues to enter valid data

    • C.

      Both of the above

    • D.

      None of the above

    Correct Answer
    A. A loop that executes 1000 times
    Explanation
    A definite loop is a loop that has a predetermined number of iterations. In this case, a loop that executes 1000 times is a definite loop because it will always run exactly 1000 times, regardless of any external conditions or user input. On the other hand, a loop that executes as long as a user continues to enter valid data is an indefinite loop because it relies on user input and can potentially run indefinitely until the user stops entering valid data. Therefore, the correct answer is a loop that executes 1000 times.

    Rate this question:

  • 9. 

    When you decrement a variable, you _____.

    • A.

      Subtract 1 from it

    • B.

      Set it to 0

    • C.

      Reduce it by one-tenth

    • D.

      Remove it from a program

    Correct Answer
    A. Subtract 1 from it
    Explanation
    When you decrement a variable, you subtract 1 from it. This means that the value of the variable is decreased by 1. It is a common operation used in programming to decrease the value of a variable by a certain amount.

    Rate this question:

  • 10. 

    When two loops are nested, the loop that is contained by the other is the _____ loop.

    • A.

      Inner

    • B.

      Captive

    • C.

      Unstructured

    • D.

      Outer

    Correct Answer
    A. Inner
    Explanation
    When two loops are nested, the loop that is contained by the other is referred to as the inner loop. The inner loop executes its set of instructions repeatedly within each iteration of the outer loop. This allows for more complex and precise control flow, as the inner loop can perform a specific task multiple times before moving on to the next iteration of the outer loop.

    Rate this question:

  • 11. 

    When loops are nested, _____.

    • A.

      None of the above

    • B.

      Both must be the same type—definite or indefinite

    • C.

      One must end before the other begins

    • D.

      They typically share a loop control variable

    Correct Answer
    A. None of the above
    Explanation
    When loops are nested, they do not necessarily have to meet any of the conditions mentioned in the answer options. The behavior of nested loops can vary depending on the specific programming language and the logic implemented within the loops. Therefore, none of the above options accurately describe the behavior of nested loops in general.

    Rate this question:

  • 12. 

    The chief advantage to using a for loop is _____.

    • A.

      Its syntax is concise

    • B.

      Infinite loops are prevented

    • C.

      Unlike a while loop, a for loop can be nested

    • D.

      Unlike a while loops, a for loop can have multiple entry and exit points

    Correct Answer
    A. Its syntax is concise
    Explanation
    The correct answer is that the chief advantage to using a for loop is that its syntax is concise. This means that the code written using a for loop is shorter and easier to read compared to other loop structures. The for loop allows initializing a variable, setting a condition, and incrementing the variable all in one line, making it more efficient and convenient for iterating over a specific range of values.

    Rate this question:

  • 13. 

    A report that lists only totals, with no details about individual records, is a(n) _____ report.

    • A.

      Summary

    • B.

      Accumulator

    • C.

      Final

    • D.

      Detailless

    Correct Answer
    A. Summary
    Explanation
    A report that lists only totals, with no details about individual records, is referred to as a summary report. This type of report provides an overview or summary of the data, presenting aggregated information such as totals, averages, or percentages without including the specific details of each individual record. It condenses the information and provides a high-level view of the data, making it easier to analyze and understand the overall trends or patterns.

    Rate this question:

  • 14. 

    Typically, the value added to a counter variable is _____.

    • A.

      1

    • B.

      0

    • C.

      10

    • D.

      100

    Correct Answer
    A. 1
    Explanation
    The value added to a counter variable is typically 1.

    Rate this question:

  • 15. 

    Typically, the value added to an accumulator variable is _____.

    • A.

      Different in each iteration

    • B.

      The same for each iteration

    • C.

      1

    • D.

      0

    Correct Answer
    A. Different in each iteration
    Explanation
    The value added to an accumulator variable is typically different in each iteration. In a loop or iteration, the accumulator variable is used to store and accumulate values. The value added to the accumulator variable can vary depending on the specific logic or calculation being performed within each iteration. This allows the accumulator variable to keep track of a changing or accumulating value throughout the loop.

    Rate this question:

  • 16. 

    After an accumulator or counter variable is displayed at the end of a program, it is best to _____.

    • A.

      None of the above

    • B.

      Subtract 1 from the variable

    • C.

      Reset the variable to 0

    • D.

      Delete the variable from the program

    Correct Answer
    A. None of the above
    Explanation
    After an accumulator or counter variable is displayed at the end of a program, it is best to leave the variable as it is without making any changes. This is because the variable may be needed for future calculations or reference, and altering it by subtracting 1, resetting it to 0, or deleting it from the program could lead to errors or incorrect results in subsequent operations.

    Rate this question:

  • 17. 

    When you _____, you make sure data items are the correct type and fall within the correct range.

    • A.

      Validate data

    • B.

      Employ offensive programming

    • C.

      Use object orientation

    • D.

      Count loop iterations

    Correct Answer
    A. Validate data
    Explanation
    The correct answer is "validate data" because when you validate data, you ensure that the data items are of the correct type and within the appropriate range. This process helps to ensure data integrity and accuracy, preventing errors and issues that may arise from using incorrect or out-of-range data. It is an important step in data validation and verification processes to ensure the reliability and validity of the data being used.

    Rate this question:

  • 18. 

    Overriding a user’s entered value by setting it to a predetermined value is known as ______.

    • A.

      Forcing

    • B.

      Accumulating

    • C.

      Validating

    • D.

      Pushing

    Correct Answer
    A. Forcing
    Explanation
    Overriding a user's entered value by setting it to a predetermined value is commonly referred to as "forcing." This term implies that the user's input is disregarded or overridden in favor of the predetermined value.

    Rate this question:

  • 19. 

    To ensure that a user’s entry is the correct data type, frequently you ______.

    • A.

      Use a method built into the programming language

    • B.

      Prompt the user to verify that the type is correct

    • C.

      Include a statement at the beginning of the program that lists the data types allowed

    • D.

      All of the above

    Correct Answer
    A. Use a method built into the programming language
    Explanation
    To ensure that a user's entry is the correct data type, it is common practice to use a method built into the programming language. These methods are specifically designed to validate and check the data type of user input, ensuring that it matches the expected type. By utilizing these built-in methods, programmers can easily verify and handle different data types without the need for additional code or manual checks. This approach helps to improve the accuracy and reliability of the program by preventing errors and unexpected behaviors caused by incorrect data types.

    Rate this question:

  • 20. 

    Variables might hold incorrect values even when they are _____.

    • A.

      All of the above

    • B.

      Coded by the programmer rather than input by a user

    • C.

      Within a required range

    • D.

      The correct data type

    Correct Answer
    A. All of the above
    Explanation
    Variables might hold incorrect values even when they are coded by the programmer rather than input by a user, within a required range, and of the correct data type. This is because the programmer may make mistakes while coding, such as assigning the wrong value to a variable. Additionally, even if the value is within the required range, it may still be incorrect for the specific context or calculation. Finally, the variable may have the correct data type, but the actual value assigned to it may still be incorrect. Therefore, all of the above factors can contribute to variables holding incorrect values.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 07, 2015
    Quiz Created by
    Lancerabago
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.