Professional Documents
Culture Documents
Instructions:
a. called
b. declared
c. compiled
a. clock
b. logic
c. memory
a. machine language
b. a high-level language
c. assembly language
d. FORTRAN
a. a computer game
b. decomposing problems into smaller units to be solved
separately
c. a Department of Defense battle simulation
13. In using Turbo Pascal, the program that turns your Pascal
statements into an assembly program is called a
_____________.
15. To use the same specific value from cell B22 in a forumla in
a range of cells created by copying a single cell, it should
be used in the formula as: ____________
18. In programing, when your program compiles and runs, but does
not implement the algorithm that you meant it to, you have
(one or more) __________ errors.
Program Waterservice;
var gallons, maxgallons:real; ServiceOn: boolean;
.
.
.
maxgallons :=10000;
gallons:= 11500;
if (gallons >= maxgallons) then ServiceOn:=false
else ServiceOn=true;"
.
.
.
Procedure End (key : char); {Lets user know that the keyboard}
{input has ended}
begin
if key = 'q' the Writeln ('You have finished entering data')
end; { of procedure}"
buyflag := TRUE;
If (price > bluebookprice) OR (price > maxprice)
then buyflag := FALSE;
a. multiple statements
b. five statements
c. three statements
d. a single statement
e. two statements
30. In Pascal, the main program must be enclosed by a _________
and an __________.
a. i and ii
b. ii and iv
c. ii only
d. ii and iii
e. i and iii
32. Two components of a von Neuman computer are "input" and "output".
Name the other three:
____________________________________ (2 Points)
____________________________________ (2 Points)
____________________________________ (2 Points)
33. (4 points) What are the four major parts (in proper order) of a
Pascal program?
____________________________________
____________________________________
____________________________________
____________________________________
34. A spreadsheet has entries in each cell from A1 through H7, and is
(partially) shown below:
A B C D E F G H
1 Batch Wafer Rejects Rejects Rejects Total Total Yield
2 Number Starts Step 1 Step 2 Step 3 Rejects Good
3 113 942 176 99 7
4 117 963 189 85 3
5 118 922 192 77 4
6 121 900 203 93 4
7 Totals
The following list gives the contents of the input line when the
cursor is on the corresponding cell. Provide (calculate) the
corresponding cell value
b) count := 0; (2 points)
while count >= 0 do
begin
count := count - 2;
writeln('hello');
end;
c) count := 1; (2 points)
repeat
DrawCircle(count,count+5);
count := count+1;
until count >= 3;
d) count := 0; (2 points)
while count < 5 do
begin
DrawCircle(count, count+1);
count := count + 1;
end;
count := count - 1;
end;
until count < 0;
A B C D
0 0 0
0 0 1
0 1 0
0 1
1