Data types

Easy
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Question 49
Easy

An algorithm is shown in Figure 1.

Figure 1

1  items ← [18, 5, 31, 12]
2  isSorted ← False
3  WHILE isSorted = False
4      isSorted ← True
5      index ← 0
6      WHILE index < 3
7          IF items[index] > items[index + 1] THEN
8              temp ← items[index]
9              items[index] ← items[index + 1]
10             items[index + 1] ← temp
11             isSorted ← False
12         ENDIF
13         index ← index + 1
14     ENDWHILE
15 ENDWHILE

State the data type of the variable isSorted in the algorithm shown in Figure 1.

[1]

Data types Questions

  1. GCSE
  2. /Computer Science
  3. /Data types