(9) A program that translates assembly language instructions into machine code
(10) When the machine code version of a program is being run
(11) A place in memory where a data value that can be changed is stored
(12) When a program in a high-level language is converted into machine code
(13) The part of the computer that holds both program and data
(14) A step-by-step procedure for solving a problem
(15) A sequence of instructions that enables a computer to perform a particular task
5. Compute the value of each legal expression. Indicate whether the value is an integer or a floating point value. If the expression is not legal, explain why.
a. 10 + 3
b. -9.4 - 6.2
c. 10.0 / 3.0
d. 10 / 3
e. 10 % 3
f. 10.0 % 3.0
g. 4 / 8
6. If alpha and beta are int variables and alpha = 4 and beta = 9, what value is stored into alpha in each of the following? Answer each part independently of the others.
a. alpha = 3 * beta;
b. alpha = alpha + beta;
c. alpha++;
d. alpha = alpha / beta;
e. alpha--;
f. alpha = alpha + alpha;
g. alpha = beta % 6;
7. Which of the following are reserved words and which are programmer-defined identifiers?
Reserved
Programmer-Defined
a. char
______
______
b. sort
______
______
c. INT
______
______
d. long
______
______
e. Float
______
______
8. Reserved words can be used as variable names. (True or False?)
9. In a C++ program consisting of just one function, that function can be named either main or Main. (True or False?)
10. If a and b are int variables and a = 5 and b = 2, what output does each of the following statements produce?