11.1 Programming basics
169 questions in this subtopic. Open a question to solve it and check the official answer.
Programming basics · 1 mark · official answer ready
(iv) IPointer^ = MyInt2 ...............................................................................................[1] 4
Programming basics · 1 mark · official answer ready
(i) @Temp2 .........................................................................................................................[1]
Programming basics · 1 mark · official answer ready
(ii) IntPointer .................................................................................................................[1]
Programming basics · 1 mark · official answer ready
(iii) IntPointer^ ...............................................................................................................[1]
Programming basics · 1 mark · official answer ready
(iv) IntPointer^ = Temp2 + 6 .....................................................................................[1] 4
Programming basics · 13 marks
(iv) Word SUBSTR("Welcome home", 4, 7) ) Word ............................................................................................................................[1] 9 Que…
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…
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…
Programming basics · 0 marks · official answer ready
2 INPUT BaggageWeight
Programming basics · 13 marks
(iv) Word SUBSTR("Welcome home", 4, 7) ) Word ............................................................................................................................[1] 9 Que…
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]
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…
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]
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…
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…
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…
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…
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
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…
Programming basics · 4 marks · official answer ready
(i) Complete the K-map corresponding to the truth table above. AB CD [4]
