TRUE/FALSE
1. In Ada, anything appearing on a line after the double slash (//) is ignored by the compiler.
ANS: F PTS: 1 REF: 3
2. Although the computer ignores comments, they are important to include in a program because
they give information to the human readers of the code.
ANS: T PTS: 1 REF: 4
3. Every high-level language has some facility for including comments, because understanding code
that someone else has written is very difficult without the notes and explanations that comments
provide.
ANS: T PTS: 1 REF: 4
4. Blank lines in Ada programs are ignored and are used, like comments, to make the program more
readable by human beings.
ANS: T PTS: 1 REF: 5
5. The core Ada language provides a way to get data into a program or for a program to display
results.
ANS: F PTS: 1 REF: 5
6. Ada is a case-sensitive language.
, ANS: F PTS: 1 REF: 9
7. FinalTotal, Finaltotal, and finalTotal are all the same identifier in Ada.
ANS: T PTS: 1 REF: 9
8. Quantities that are fixed throughout the duration of the program and their values are known ahead
of time are called constants.
ANS: T PTS: 1 REF: 9
9. Variable declarations are just like constant declarations, with the addition of the keyword var.
ANS: F PTS: 1 REF: 11
10. Control statements affect the order in which instructions are executed.
ANS: T PTS: 1 REF: 13
11. A program executes one instruction or program statement at a time.
ANS: T PTS: 1 REF: 13
12. A literal string is enclosed in single quotes.
ANS: F PTS: 1 REF: 14
13. Without a prompt, the user may be unaware that the program is waiting for some input.
, ANS: T PTS: 1 REF: 15
14. Ada does type casting automatically.
ANS: F PTS: 1 REF: 18
15. A program that contains an infinite loop will theoretically execute forever.
ANS: T PTS: 1 REF: 30
16. If the value is one that the module must know to do its job but should not change, then the
argument is passed by name.
ANS: F PTS: 1 REF: 42
17. A function is invoked wherever the returned value is to be used, rather than in a separate
statement.
ANS: T PTS: 1 REF: 47
18. Object-oriented programming takes the divide-and-conquer approach.
ANS: F PTS: 1 REF: 54
19. Public operations can be used anywhere, including within the main program code and indeed in
any Ada program that wants to make use of this type.
ANS: T PTS: 1 REF: 60
, 20. Thanks to the encapsulation property of object-oriented programming, changes can be made in
type implementations without affecting other code, although such change requires retesting the
types.
ANS: T PTS: 1 REF: 66
21. Inheritance can be carried through only one generation.
ANS: F PTS: 1 REF: 65
22. There are two major reasons why OOP is a popular way to program: software reuse and it
provides a more natural “worldview.”
ANS: T PTS: 1 REF: 65
23. A graphical user interface, with its windows, icons, buttons, and menus, is an example of a Von
Neumann machine at work.
ANS: F PTS: 1 REF: 66
24. Modern computer terminals use what is called a bitmapped display, in which the screen is made
up of thousands of individual picture elements.
ANS: T PTS: 1 REF: 68
25. The individual pixels in the display are addressed using a two-dimensional coordinate grid
system, the pixel in the upper-left corner being (1, 1).
ANS: F PTS: 1 REF: 69
MULTIPLE CHOICE