Computer Science 9608 · 10

Data types and structures

283 questions. Open a question to solve it and check the official answer.

2015 October-November · Paper 23 · Q6(b)(i)

Data types and records · 1 mark · official answer ready

(i) The declaration of a BOOLEAN global variable. .................... [1]

2015 October-November · Paper 23 · Q6(b)(ii)

Data types and records · 1 mark · official answer ready

(ii) The declaration of a local variable. .................... [1]

2015 October-November · Paper 23 · Q6(b)(iii)

Data types and records · 1 mark · official answer ready

(iii) The incrementing of a variable used as a counter, but not to control a ‘count controlled’ loop. .................... [1]

2015 October-November · Paper 23 · Q6(b)(iv)

Data types and records · 1 mark · official answer ready

(iv) A statement which uses a built-in function of the programming language. .................... [1]

2015 October-November · Paper 23 · Q6(c)(iv)

Data types and records · 2 marks · official answer ready

(iv) Give the global variable that needs to be declared at line 03. ...............................................................................................................…

2015 October-November · Paper 23 · Q7(a)

Data types and records · 4 marks

(a) Show the values stored by variables A, B, C and D. The & operator is used to concatenate two strings. Num1 ← 15 A ← CHR(67) & CHR(65) & CHR(84) (i) A .........................…

2015 October-November · Paper 23 · Q7(b)

Data types and records · 6 marks · official answer ready

(b) A program is to be written which accepts a string and then calculates a numeric value from this string. The input string and the calculated value are then to be sent to a remo…

2015 October-November · Paper 23 · Q7(c)

Data types and records · 2 marks · official answer ready

(c) Explain the purpose of sending the value of StringTotal to the remote computer, in addition to MyString. ......................................................................…

2015 October-November · Paper 23 · Q8(a)

Data types and records · 1 mark · official answer ready

(a) Give the value assigned to variable y by the following statement: y ← ONECHAR("San Francisco", 6) y ............................................. [1] A program reads a string …

2015 October-November · Paper 23 · Q8(b)

Data types and records · 3 marks · official answer ready

(b) Study the sequence of pseudocode statements. Show the values assigned to each variable. FractionString ← "3/7+2/9" N3Char ← ONECHAR(FractionString, 5) (i) N3Char .............…

2015 October-November · Paper 23 · Q8(b)(iii)

Data types and records · 3 marks · official answer ready

8 In this question you will need to use the given pseudocode built-in function: ONECHAR(ThisString : STRING, Position : INTEGER) RETURNS CHAR returns the single character at posit…

2015 October-November · Paper 23 · Q8(c)(i)

Data types and records · 2 marks · official answer ready

(i) FractionString ← "2/5-3/8" N1 N2 N3 N4 BottomAnswer Op TopAnswer OUTPUT [2]

2015 October-November · Paper 23 · Q8(c)(ii)

Data types and records · 2 marks · official answer ready

(ii) FractionString ← "3/4+1/4" N1 N2 N3 N4 BottomAnswer Op TopAnswer OUTPUT [2]

2015 October-November · Paper 23 · Q8(c)(iii)

Data types and records · 3 marks · official answer ready

(iii) FractionString ← "7/9+2/3" N1 N2 N3 N4 BottomAnswer Op TopAnswer OUTPUT [3]

2015 October-November · Paper 23 · Q8(d)(i)

Data types and records · 1 mark · official answer ready

(i) State the name for this type of maintenance. ..................................................................................................................................…

2015 October-November · Paper 41 · Q4(a)

Introduction to abstract data types · 4 marks · official answer ready

(a) Show the final state of the binary tree after the following operations are carried out. CreateTree Add("Dodi") Add("Farai") Add("Elli") Add("George") Add("Ben") Add("Celine") …

2015 October-November · Paper 41 · Q4(b)

Data types and records · 62 marks · official answer ready

(b) The binary tree ADT is to be implemented as an array of nodes. Each node consists of data and two pointers. Using pseudocode, a record type, Node, is declared as follows: TYPE…

2015 October-November · Paper 42 · Q4(a)

Data types and records · 5 marks · official answer ready

4 5 6 7 8 9 3 (i) Complete the GANTT chart by adding activities M and N. [2] (ii) State the earliest completion date. Week number .................................................…

2015 October-November · Paper 42 · Q4(b)(iii)

Introduction to abstract data types · 6 marks · official answer ready

4 5 6 7 8 9 3 (i) Complete the GANTT chart by adding activities M and N. [2] (ii) State the earliest completion date. Week number .................................................…

2015 October-November · Paper 42 · Q7(e)(iii)

Arrays · 32 marks

(iii) to create a new instance of FullTimeStudent with: • identifier: NewStudent • name: A. Nyone • date of birth: 12/11/1990 • telephone number: 099111 Programming language .....…