Data types and structures
283 questions. Open a question to solve it and check the official answer.
Data types and records · 1 mark · official answer ready
(i) The declaration of a BOOLEAN global variable. .................... [1]
Data types and records · 1 mark · official answer ready
(ii) The declaration of a local variable. .................... [1]
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]
Data types and records · 1 mark · official answer ready
(iv) A statement which uses a built-in function of the programming language. .................... [1]
Data types and records · 2 marks · official answer ready
(iv) Give the global variable that needs to be declared at line 03. ...............................................................................................................…
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 .........................…
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…
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. ......................................................................…
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 …
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 .............…
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…
Data types and records · 2 marks · official answer ready
(i) FractionString ← "2/5-3/8" N1 N2 N3 N4 BottomAnswer Op TopAnswer OUTPUT [2]
Data types and records · 2 marks · official answer ready
(ii) FractionString ← "3/4+1/4" N1 N2 N3 N4 BottomAnswer Op TopAnswer OUTPUT [2]
Data types and records · 3 marks · official answer ready
(iii) FractionString ← "7/9+2/3" N1 N2 N3 N4 BottomAnswer Op TopAnswer OUTPUT [3]
Data types and records · 1 mark · official answer ready
(i) State the name for this type of maintenance. ..................................................................................................................................…
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") …
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…
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 .................................................…
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 .................................................…
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 .....…
