Question 1 of 10
What is displayed?
k ← 12
k ← 5
DISPLAY (k)
- A. Nothing is displayed.
- B. 12
- C. 5
- D. 17
What is displayed?
k ← 12
k ← 5
DISPLAY (k)
Which description matches the effect of w ← z when w is 4 and z is 9 beforehand?
A botched swap runs as follows with u = 1 and v = 2 initially.
u ← v
v ← u
What are u and v afterward?
After the segment, which values are stored?
p ← 4
q ← 9
r ← p
p ← q
q ← r
A variable can best be described as:
Trace carefully. What is displayed in order?
a ← 5
b ← 2
a ← a - b
b ← a + b
a ← b - a
DISPLAY (a)
DISPLAY (b)
The order of assignments matters. Which final value of t is produced?
t ← 10
t ← t / 2
t ← t + 3
Which segment ends with high and low swapped from their initial values high=20 and low=5?
After count ← 0 and then three statements count ← count + 1, what is count?
A program runs:
x ← 2
y ← x
x ← 9
DISPLAY (y)
What is displayed, and why?