Computer And Information Technology: Quiz!

20 Questions | Total Attempts: 426

SettingsSettingsSettings
Please wait...
Computer And Information Technology: 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

  • 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

  • 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.

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

      Loop body

    • B. 

      Loop controls

    • C. 

      Sequences

    • D. 

      Sentinels

  • 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

  • 6. 
    Adding 1 to a variable is also called _____ it.
    • A. 

      Incrementing

    • B. 

      Decrementing

    • C. 

      Resetting

    • D. 

      Digesting

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

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

      1

    • B. 

      0

    • C. 

      10

    • D. 

      100

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

Back to Top Back to top