Chapter 1

OVERVIEW OF PROGRAMMING

AND PROBLEM SOLVING

 

 

True/False

1. There is only one unique general solution (algorithm) for a given problem.

2. All computer programs are algorithms.

3. All algorithms can be implemented as computer programs.

4. In a computer, data is represented electronically by pulses of electricity.

5. RAM stands for random access memory.

6. The term software refers to the physical components of a computer.

7. The compiler is a program that translates a high-level language program into machine code.

8. The two components of the central processing unit (CPU) are the arithmetic/logic unit and the control unit.

9. Magnetic tape drives and floppy disk drives are examples of auxiliary (secondary) storage devices.

10. In the "solve by analogy" technique, you solve a problem by modifying the solution to a similar problem.

Multiple Choice

11. Which one of the following is not one of the three major phases in the life cycle of a computer program?

a. the problem-solving phase

b. the management phase

c. the implementation phase

d. the maintenance phase

12. Which of the following is the first step in the problem-solving phase of a computer program's life cycle?

a. Translate the general solution into code.

b. Write a general solution for the problem.

c. Test the general solution.

d. Analyze the problem.

e. Test the solution on a computer.

13. Which of the following is the second step in the problem-solving phase of a computer program's life cycle?

a. Translate the general solution into code.

b. Write a general solution for the problem.

c. Test the general solution.

d. Analyze the problem.

e. Test the solution on a computer.

14. Which of the following is the first step in the implementation phase of a computer program's life cycle?

a. Translate the general solution into code.

b. Write a general solution for the problem.

c. Test the general solution.

d. Analyze the problem.

e. Test the solution on a computer.

15. Which of the following is the second step in the implementation phase of a computer program's life cycle?

a. Translate the general solution into code.

b. Write a general solution for the problem.

c. Test the general solution.

d. Analyze the problem.

e. Test the solution on a computer.

16. The following series of steps is not an algorithm. How would you correct it?

Putting on a Pair of Athletic Shoes

Step 1. Put on one shoe.

Step 2. Tie the laces.

Step 3. Repeat.

a. Exchange steps 1 and 2.

b. Exchange steps 2 and 3.

c. Change step 3 to "Repeat once."

d. Change step 1 to "Put on both shoes."

17. Inside a computer, a single character such as the letter A usually is represented by a:

a. bit

b. byte

c. nibble

d. word

18. Which of the following translates a program written in a high-level language into machine code?

a. an assembler

b. a compiler

c. an operating system

d. an editor

19. Which of the following most closely resembles human language?

a. a high-level language

b. a machine language

c. an assembly language

20. Which of the following terms describes the repetition of statements (instructions) while certain conditions are met?

a. sequence

b. selection

c. looping

d. subprogram

21. Which of the following terms describes the execution of different statements (instructions) depending on certain conditions?

a. sequence

b. selection

c. looping

d. subprogram

22. Which of the following terms describes the execution of a series of statements (instructions) one after another?

a. sequence

b. selection

c. looping

d. subprogram

23. Of the following components of a computer, which one stores data and instructions?

a. input device

b. output device

c. arithmetic/logic unit

d. control unit

e. memory unit

24. Of the following components of a computer, which one performs computations?

a. input device

b. output device

c. arithmetic/logic unit

d. control unit

e. memory unit

25. Of the following components of a computer, which one assures that program instructions are executed in the proper sequence?

a. input device

b. output device

c. arithmetic/logic unit

d. control unit

e. memory unit

26. Of the following components of a computer, which one fetches the next instruction from RAM during program execution?

a. input device

b. auxiliary storage device

c. arithmetic/logic unit

d. control unit

e. memory unit

27. Of the following components of a computer, which one presents the results of the processing to the outside world?

a. input device

b. output device

c. arithmetic/logic unit

d. control unit

e. memory unit

28. Which problem-solving technique involves the breaking up of a large problem into smaller units that are easier to handle?

a. divide and conquer

b. means-ends analysis

c. solving by analogy

d. the building-block approach

e. merging solutions

29. Which problem-solving technique involves integrating existing solutions on a step-by-step basis into a complete solution?

a. divide and conquer

b. means-ends analysis

c. solving by analogy

d. the building-block approach

e. merging solutions

30. Which problem-solving technique involves defining the beginning and ending states of a problem, then comparing different methods for getting between the states?

a. divide and conquer

b. means-ends analysis

c. solving by analogy

d. the building-block approach

e. merging solutions

31. Which problem-solving technique involves recognizing that the problem you are working on is similar to one that you have worked on before?

a. divide and conquer

b. means-ends analysis

c. solving by analogy

d. the building-block approach

e. merging solutions

Fill-In

32. A general solution, or algorithm, is written during the ____________________ phase of a computer program's life cycle.

33. Coding of an algorithm takes place during the ____________________ phase of a computer program's life cycle.

  1. Modifications are made to an existing computer program during the ____________________ phase of the program's life cycle.

35. A(n) ____________________ is a step-by-step procedure for solving a problem in a finite amount of time.

 

 

36. A(n) ____________________ is a set of rules, symbols, and special words used to construct a computer program.

37. ____________________ is the written text and comments that make a program easier for others to understand, use, and modify.

38. ____________________ is information that has been put into a form that a computer can use.

39. A single binary digit (that is, a single 1 or 0) is called a(n) ____________________.

40. A sequence of 8 bits is known as a(n) ____________________.

41. ____________________ is the language made up of binary-coded instructions that are used directly by the computer.

42. A(n) ____________________ is a program that translates a high-level language program into machine code.

43. A program written in a high-level programming language is called the ____________________ program.

44. A(n) ____________________ is an input, output, or auxiliary storage device attached to a computer.

45. The ____________________ program is the machine language version of a source program.

46. The ____________________ is the set of programs that manages all of a computer's resources.

47. A(n) ____________________ is a connecting link at a shared boundary that allows independent systems to meet and act on or communicate with each other.

48. In the "____________________" problem-solving technique, you recognize any subtasks that have been solved before and use those as solutions to part of the problem.

49. In the "____________________" problem-solving technique, you define the beginning and ending states of the problem, then compare different methods for getting between them.

50. In the "____________________" problem-solving technique, you break the problem up into smaller pieces that have been solved before, then tie the pieces together into a complete solution.