Computer Science 9608 · 11

Programming

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

Reset
2018 October-November · Paper 21 · Q4(a)(ii)

Constructs · 4 marks · official answer ready

(ii) Describe in detail the purpose of lines 19 to 26 in the function ScanArray(). Do not use pseudocode in your answer. ..........................................................…

2018 October-November · Paper 21 · Q4(b)

Constructs · 6 marks · official answer ready

(b) The function ScanArray() needs to be amended so that the comparison is not case sensitive. For example, comparing “Aaaa” with “AAAa” should evaluate to TRUE. Write program cod…

2018 October-November · Paper 22 · Q1(a)

Constructs · 6 marks

1 (a) The following table contains statements written in pseudocode. Show the type of programming construct each statement represents. Put a tick (3) in the appropriate column for…

2018 October-November · Paper 22 · Q3(a)

Programming basics · 2 marks · official answer ready

3 (a) Programming is sometimes referred to as a transferable skill. You are asked to work on a program written in a language you are not familiar with. Explain how transferable sk…

2018 October-November · Paper 22 · Q4(a)(i)

Structured programming · 5 marks · official answer ready

(i) Examine the pseudocode. Complete the following table. Answer The identifier name of a local variable The identifier name of a user-defined procedure The identifier name of a u…

2018 October-November · Paper 22 · Q4(c)(i)

Structured programming · 1 mark · official answer ready

(i) State how structured programming languages support the implementation of sub-tasks. ...........................................................................................…

2018 October-November · Paper 22 · Q4(d)

Constructs · 3 marks · official answer ready

(d) ResultArray is a 1D array of type STRING. It contains 100 elements. Write program code to declare ResultArray and set all elements to the value "NO DATA". Programming language…

2018 October-November · Paper 23 · Q1(a)

Constructs · 6 marks

1 (a) The following table contains statements written in pseudocode. Show the type of programming construct each statement represents. Put a tick (3) in the appropriate column for…

2018 October-November · Paper 23 · Q1(b)(ii)

Constructs · 5 marks · official answer ready

(ii) The following table contains statements written in pseudocode. Complete the table by evaluating each expression using the values from part (b)(i). If any expression is invali…

2018 October-November · Paper 23 · Q4(b)

Structured programming · 8 marks · official answer ready

(b) Line 118 of the function Update() calls the subroutine Insert(). A designer decides to convert Insert() from a procedure to a function. Insert() returns TRUE or FALSE. A progr…

2018 October-November · Paper 23 · Q4(d)(ii)

Programming basics · 1 mark · official answer ready

(ii) A programmer decides to declare LastElement as a constant instead of a variable. Write a statement in pseudocode to declare LastElement as the value 200. ....................…

2018 October-November · Paper 31 · Q4(a)(iii)

Programming basics · 3 marks · official answer ready

(iii) The K‑map can be used to simplify the expression in part (a)(i). Draw loop(s) around appropriate groups of 1s in the table in part (a)(ii) to produce an optimal sum‑of‑produ…

2018 October-November · Paper 31 · Q4(a)(iv)

Programming basics · 3 marks · official answer ready

(iv) Write the simplified sum‑of‑products expression for your answer to part (a)(iii). X = ........................................................................................…

2018 October-November · Paper 31 · Q4(b)(ii)

Programming basics · 2 marks · official answer ready

(ii) Draw loop(s) around appropriate groups of 1s in the table in part (b)(i) to produce an optimal sum‑of‑products. [2]

2018 October-November · Paper 31 · Q4(b)(iii)

Programming basics · 2 marks · official answer ready

(iii) Write the simplified sum‑of‑products expression for your answer to part (b)(ii). X = ........................................................................................…

2018 October-November · Paper 31 · Q6(a)

Programming basics · 3 marks · official answer ready

(a) Complete the symbol table to show its contents after the lexical analysis stage. Token Symbol Value Type Start 60 Variable 1 61 Constant [3]

2018 October-November · Paper 32 · Q3(c)(ii)

Programming basics · 2 marks · official answer ready

(ii) Draw loops around appropriate groups of 1s in the table in part (c)(i) to produce an optimal sum-of-products. [2]

2018 October-November · Paper 32 · Q3(c)(iii)

Programming basics · 2 marks · official answer ready

(iii) Using your answer to part (c)(ii), write a simplified sum-of-products Boolean expression. X = ...............................................................................…

2018 October-November · Paper 32 · Q4(a)

Programming basics · 3 marks · official answer ready

(a) Complete the symbol table to show its contents after the lexical analysis stage. Token Symbol Value Type Number1 60 Variable Number2 61 Variable [3] 9

2018 October-November · Paper 33 · Q4(a)(iii)

Programming basics · 3 marks · official answer ready

(iii) The K‑map can be used to simplify the expression in part (a)(i). Draw loop(s) around appropriate groups of 1s in the table in part (a)(ii) to produce an optimal sum‑of‑produ…