Programming & Testing

10 Questions | Attempts: 160
Share

SettingsSettingsSettings
Programming Quizzes & Trivia

Study your notes on Programming and Testing and Debugging before trying out this exercise.


Questions and Answers
  • 1. 

    Programs written in a language like Java or Pascal need to be translated before the computer can execute (run) them.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 2. 

    Variables in the same scope should not have identical names.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 3. 

    The value in a variable cannot be changed while the program is running.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The value in variables can change while a program is running, for example when the result of a calculation is placed in a variable.

    Rate this question:

  • 4. 

    A syntax error will not allow a program to run.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 5. 

    A run-time error occurs when

    • A.

      A programmer makes a syntax error

    • B.

      The program encounters an input or situation it is not designed to handle

    Correct Answer
    B. The program encounters an input or situation it is not designed to handle
  • 6. 

    An instruction that has a syntax error

    • A.

      Cannot be executed

    • B.

      Will be executed but gives the wrong result

    • C.

      Will be executed and will SOMETIMES give the wrong result

    Correct Answer
    A. Cannot be executed
  • 7. 

    If a program that is supposed to calculate and output the area of a window has an incorrect formula for finding the area, the error involved is known as a

    • A.

      Syntax error

    • B.

      Logical error

    • C.

      Run time error

    Correct Answer
    B. Logical error
  • 8. 

    Testing a program by working through it manually is known as

    • A.

      Dry run

    • B.

      Break point

    • C.

      Variable check

    Correct Answer
    A. Dry run
  • 9. 

    What is a trace table?

    • A.

      A table with a list of the errors in a program

    • B.

      A debugging tool that helps programmers detect when an error is occuring and why

    • C.

      A table that lists all the variables in a program

    Correct Answer
    B. A debugging tool that helps programmers detect when an error is occuring and why
  • 10. 

    When preparing test data to test a program one should use

    • A.

      Reasonable data

    • B.

      Unreasonable data

    • C.

      Both reasonable and unreasonable data

    Correct Answer
    C. Both reasonable and unreasonable data

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 15, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 10, 2011
    Quiz Created by
    Marlenegalea
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.