COMPUTER SCIENCE 60-140-01/02
QUIZ #1
MOCK (For Class participation mark)
Examiner:
Dr. C.I. Ezeife Given: Mon (Sep 28) and Tues Sep 29, 2015
Student
Name:______________________________
Lecture
section: _____1 (circle one)__
Student
Number:___________________________
Lab.
Section: 51, 52, 53, 54, other (circle
one)
55, 56, 57, other
(circle one)
INSTRUCTIONS (Please Read Carefully)
No calculators allowed.
Just complete in 10 minutes, we mark and you hand in. I will announce answers.
8 Multiple choice questions:
1 With the initial value of variable knt = 10, the C instruction knt %= 3 will cause the current value of knt to be:
a. 3
b.
13
Ö c. 1
d. 7
e.
none of the above (Answer is
(c) )
2. The first generation computers have _______.
Ö a. Vacuum tube technology
b. Large and very large-scale
integrated circuit chip.
c. Integrated circuit silicon chip
d. Transistors
e. None of the above. (Answer is
(a) )
To answer
the next 5 questions, assume the initial contents of memory addresses are as
follows:
Address |
Contents |
01 |
1 |
02 |
2 |
03 |
-3 |
04 |
4 |
05 |
10 |
If the
computer executes the following sequence of instructions, answer the questions
to report the effect of executing these instructions.(Assume that each memory
cell can store an integer).
STEP1: content of memory address 03 = content of memory address 01 % content of memory address 02.
STEP2: content of memory address
01 = content of memory address 01 / content of memory address 05
STEP3: content of memory address 04 = content of memory address 01 + 3 times the content of memory address
04.
STEP 4: content of memory address
02 = content of memory address 04 - content of memory address 01.
STEP 5: content of memory address 05 = content of memory address 05 *
content of memory address 03.
3. The new content of memory address 01 is
Ö a.0 b. 5 c. 2 d.
1 e. none of the above
(Answer is (a) )
4. The new content of memory address 02 is
a. -12 Ö b. 12 c.
8 d. 15 e. none of the above
(Answer is (b) )
5. The new content of memory address 03 is
a. 0 Ö b. 1 c.
5 d. -6 e. none of the above
(Answer is (b) )
6. The new content of memory address 04 is
a. 27 Ö b. 12 c.13 d. 3 e. none of
the above
(Answer is (b) )
7. The new content of memory address 05 is
a. 70 b. –60 c.
7 Ö d. 10 e. none of the above
(Answer is (d) )
8. The float number 0.0006785 can be printed in
scientific notation with %0.2e as:
a. 67825 b. 6.78e04 Öc. 6.79e-04 d.6.785e-05 e.
none of the above
(Answer is (c) )