Programming
471 questions. Open a question to solve it and check the official answer.
Programming basics · 2 marks
(ii) Draw loops around appropriate groups of 1s in the K-map to produce an optimal sum-of-products. [2]
Programming basics · 2 marks
(iii) Write the simplified sum-of-products Boolean algebraic expression for the truth table. X = ..................................................................................…
Constructs · 6 marks · official answer ready
(b) One of the main tasks of an operating system is resource management. Describe how an operating system can maximise the use of resources. Primary memory .......................…
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 Counter 60 Variable [3]
Constructs · 2 marks · official answer ready
(b) The output from the lexical analysis stage is stored in the following table. Each cell stores one byte of the output. Complete the output from the lexical analysis using the k…
Constructs · 3 marks · official answer ready
(c) Give one example of a monitoring system. Explain why this is a monitoring system. Monitoring system ...........................................................................…
Constructs · 6 marks
(b) The club also considers storing the data in the order in which it receives the scores as a linked list in a 1D array of records. The following pseudocode algorithm searches fo…
Constructs · 1 mark · official answer ready
(i) Give the name of this algorithm. ..................................................................................................................................... [1]
Constructs · 5 marks · official answer ready
(i) Complete the binary tree to show how the data above will be organised. RootPointer The symbol Ø represents a null pointer LeftPointer RightPointer 36 21 Ø 45 65 Ø 66 Ø [5] 3
Structured programming · 7 marks · official answer ready
(iii) The stack is implemented as a 1D array, with eight elements, and given the identifier ArrayStack. The global variable Top contains the index of the last element in the stack…
Constructs · 4 marks · official answer ready
3 (a) Identify and describe two features of an editor that can help a programmer to write program code. Feature 1 .................................................................…
Constructs · 4 marks · official answer ready
(i) Complete the trace table for the algorithm given in part (b), for the ArrayData values given in the table. ArrayData Count TempValue Sorted 0 1 2 3 4 5 5 20 12 25 32 29 [4] 19
Constructs · 3 marks · official answer ready
(ii) Rewrite lines 4 to 12 of the algorithm in part (b) using a WHILE loop instead of a FOR loop. .................................................................................…
Constructs · 1 mark · official answer ready
(iii) Identify the algorithm shown in part (b). ...................................................................................................................................…
Constructs · 1 mark · official answer ready
(iv) Identify another sorting algorithm. ..................................................................................................................................... [1] …
Constructs · 6 marks
(b) The club also considers storing the data in the order in which it receives the scores as a linked list in a 1D array of records. The following pseudocode algorithm searches fo…
Constructs · 1 mark · official answer ready
(i) Give the name of this algorithm. ..................................................................................................................................... [1]
Constructs · 4 marks · official answer ready
(d) Write an SQL script to display the title and rating of all movies scheduled to play on screen number 3. .......................................................................…
Constructs · 6 marks
1 (a) The following table contains statements written in pseudocode. Show what type of programming construct each statement represents. Put a tick (3) in the appropriate column fo…
Programming · 2 marks · official answer ready
(iii) Explain how the use of constants helps to minimise programming errors. ......................................................................................................…
