Computer Science 9608 · 11

11.1 Programming basics

169 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2017 May-June · Paper 32 · Q1(c)(iv)

Programming basics · 1 mark · official answer ready

(iv) IPointer^ = MyInt2 ...............................................................................................[1] 4

2017 May-June · Paper 33 · Q1(c)(i)

Programming basics · 1 mark · official answer ready

(i) @Temp2 .........................................................................................................................[1]

2017 May-June · Paper 33 · Q1(c)(ii)

Programming basics · 1 mark · official answer ready

(ii) IntPointer .................................................................................................................[1]

2017 May-June · Paper 33 · Q1(c)(iii)

Programming basics · 1 mark · official answer ready

(iii) IntPointer^ ...............................................................................................................[1]

2017 May-June · Paper 33 · Q1(c)(iv)

Programming basics · 1 mark · official answer ready

(iv) IntPointer^ = Temp2 + 6 .....................................................................................[1] 4

2016 October-November · Paper 21 · Q19(b)(iv)

Programming basics · 13 marks

(iv) Word SUBSTR("Welcome home", 4, 7) ) Word ............................................................................................................................[1] 9 Que…

2016 October-November · Paper 22 · Q4(b)

Programming basics · 4 marks · official answer ready

(b) Write program code to generate and output four winning numbers. Ignore the issue that duplicate numbers may be generated. Visual Basic and Pascal: You should include declarati…

2016 October-November · Paper 22 · Q5(b)(ii)

Programming basics · 4 marks · official answer ready

(ii) Write the program code for step 02.1 Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for eac…

2016 October-November · Paper 23 · Q2

Programming basics · 0 marks · official answer ready

2 INPUT BaggageWeight

2016 October-November · Paper 23 · Q19(b)(iv)

Programming basics · 13 marks

(iv) Word SUBSTR("Welcome home", 4, 7) ) Word ............................................................................................................................[1] 9 Que…

2016 October-November · Paper 31 · Q4(a)(i)

Programming basics · 13 marks · official answer ready

(i) Complete the truth table for this logic circuit. X Input Output A X Y A B Y 0 0 0 1 1 0 B 1 1 [2]

2016 October-November · Paper 32 · Q5(a)(i)

Programming basics · 2 marks · official answer ready

(i) A half adder is a logic circuit with the following truth table. Input Output X Y A B 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 The following logic circuit is constructed. P X A J HALF A…

2016 October-November · Paper 33 · Q4(a)(i)

Programming basics · 13 marks · official answer ready

(i) Complete the truth table for this logic circuit. X Input Output A X Y A B Y 0 0 0 1 1 0 B 1 1 [2]

2016 May-June · Paper 21 · Q6(b)(ii)

Programming basics · 49 marks · official answer ready

(ii) Write program code to implement the flowchart design. In addition to the Lookup array, assume that the following variables have been declared: StartPos, NumToChange, n, NewCh…

2016 May-June · Paper 22 · Q6(b)(ii)

Programming basics · 49 marks · official answer ready

(ii) Write program code to implement the flowchart design. In addition to the Lookup array, assume that the following variables have been declared: StartPos, NumToChange, n, NewCh…

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

Programming basics · 7 marks · official answer ready

(ii) An experienced programmer suggests this pseudocode would be best designed as a function. Complete the re-design of the pseudocode as follows: The main program: • the user ent…

2015 October-November · Paper 22 · Q7(b)(i)

Programming basics · 8 marks · official answer ready

(i) Write the above pseudocode algorithm as program code. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment s…

2015 October-November · Paper 31 · Q2(a)

Programming basics · 3 marks · official answer ready

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

2015 October-November · Paper 31 · Q5(a)(i)

Programming basics · 3 marks · official answer ready

(i) Complete the Boolean function that corresponds to the following truth table. INPUT OUTPUT A B C X 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1 X = A . B . C…

2015 October-November · Paper 31 · Q5(b)(i)

Programming basics · 4 marks · official answer ready

(i) Complete the K-map corresponding to the truth table above. AB CD [4]