QUIZ
on Chapter #4 in Programming Logic and Design
This
is an open notes/open book quiz. It
should be done individually without consultation with other students. The quiz should be emailed to me by the
first class day after the week it was posted.
There will be a penalty for late quizzes (a grade if it is late and a
grade for each week until the grade reaches a D - a quiz grade will never drop
below a D based on lateness - you can only fail a quiz based on your answers).
If you feel a fill in the blank or true/false question needs to be explained,
feel free to include an explanation! On
True/False questions if I also ask for WHY you must explain why
the statement is False if you pick False.
|
# |
Question |
Your Answer |
|
1. |
True or False and WHY: You should not use embedded spaces in a variable name. |
|
|
2. |
True
or False and WHY: After reading an input record the programmer should always check and
see if the read was successful or whether EOF was encountered. |
|
|
3. |
True
or False and WHY: Source code is the compiled or machine-language version of a code. |
|
|
4. |
True
or False and WHY: When writing a program that produces a report, your first task is to
determine what the output should be and then determine whether you have the
access to the data needed to produce the report. |
|
|
5. |
True
or False and WHY: A good programming technique is to store modules in separate files
and use code to include them in appropriate places in your program. |
|
|
6. |
True
or False and WHY: The operating system stores numeric and character data in the same
format. |
|
|
7. |
True or False and WHY: The standard input device
is usually the A drive and the standard output device is usually the printer. |
|
|
8. |
True
or False and WHY: When you read input data from a file/table you need to specify a
memory position for just the data you plan to use. |
|
|
9. |
True or False and WHY: It is better to code a
constant with a name and an assigned value then to use the value directly in
the code. |
|
|
10. |
The three modules of the mainline logic of a
typical procedural program are: ________, ________, and _________. |
|
|
11. |
Giving a starting value to a variable is known as
______________ or your book also says defining the variable. |
|
|
12. |
True or False and WHY: Declaring a variable
involves selecting a name and a type and assigning the variable to a memory
location that can be used to both store and retrieve data. |
|
|
13. |
True or False and WHY: Programmers frequently
use temporary variables to hold step by step results in a complex
calculation. |
|
|
14. |
A __________________ is used to show module relationships. It shows the modules that
appear in the program and which module calls which but it does not detail the
code in the module. |
|
|
15. |
True or False and WHY: Some language require you
to specify the length of all variables, other languages assign a
predetermined size depending on the type for some types of variables. |
|
|
16. |
In the
literal "IDNO
Name", what purpose do the blanks between IDNO and Name
serve? What will actually appear if
the literal is printed on a report? |
|
|
17. |
True or False and WHY: When you open a file you
must provide information about the name of the file and where it is stored. |
|
|
18. |
A group of variables is frequently referred to as
a data _____________. |
|
|
19. |
True or False and WHY: The first read in a program
is called the ______________ or ___________ read and should be done in
housekeeping or processing starts. |
|
|
20 |
Name a language that provides an initial value of
0 to a numeric variable. ______________ |
|
|
21. |
Name a language that does not provide an initial
value of 0 to a numeric variable. ______________ |
|
|
22.
|
True or False and WHY: When you declare the
areas to hold data from a file or table, you do not give them an initial
value. |
|
|
23. |
True or False and WHY: All reads after the first
read should be done at the beginning of the main processing loop. |
|
|
24. |
True or False and WHY: Programming languages have
a way to advance to the top of a new page or to double or triple space a
report. |
|
|
25. |
Name three things that can be done in the
housekeeping section of a program: __________, ____________,
________________. |
|