Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. T F A programmer usually finds that it takes longer to find the errors in a p

ID: 3836385 • Letter: 1

Question

1. T   F   A programmer usually finds that it takes longer to find the errors in a program so the program can execute correctly than it takes to write the program in the first place.

2. T   F In debugging a program, one can simulate data entry from the keyboard by setting a breakpoint before the input instruction, and just depositing some value into a register as if it came from the keyboard.

3. T   F In structured programming, one must enter a processing box at exactly one entrance point, but can leave the processing box at up to 4 exit points, depending on the nature of the processing being performed.

4. The structured programming construct that executes the same sequence again and again until told not to is:

   a. sequential
   b. conditional
   c. iterative.

5. In debug mode, one can cause execution of one or more instructions by:

   a. RUN command
   b. set breakpoint command, followed by the RUN command
   c. Single step command
   d. All of the above

6. __________________ is the term usually associated with the process of systematically decomposing a natural language statement of a program into smaller pieces by means of three primitive constructs.

7. An important first step in any algorithm, or computer program, is to ____________ all the variables, that is, to put each variable into a known state.

Explanation / Answer

Answer in bold.

1. T   F   A programmer usually finds that it takes longer to find the errors in a program so the program can execute correctly than it takes to write the program in the first place.

True, debugging can in general take lot of time without proper consideration while creating the program

2. T   F In debugging a program, one can simulate data entry from the keyboard by setting a breakpoint before the input instruction, and just depositing some value into a register as if it came from the keyboard.

True, debugger helps in doing that

3. T   F In structured programming, one must enter a processing box at exactly one entrance point, but can leave the processing box at up to 4 exit points, depending on the nature of the processing being performed.

False, there are two exit points only.

4. The structured programming construct that executes the same sequence again and again until told not to is:

   a. sequential
   b. conditional
   c. iterative.

iterative