Programming
34 questions. Open a question to solve it and check the official answer.
Constructs · 6 marks · official answer ready
1 A high-level programming language has built-in string handling functions specified as follows: ONECHAR(ThisString : STRING, x : INTEGER) RETURNS STRING returns a string value co…
Programming · 3 marks · official answer ready
(iii) Initially, all squares are to be white squares. Write program code to initialise Puzzle. Programming language ...............................................................…
Structured programming · 3 marks · official answer ready
(iii) The procedure CheckForStartOfWord(Puzzle, ThisRow, ThisColumn, Across, Down) has five parameters. Parameters can be passed by reference or by value. For each parameter, tick…
Constructs · 7 marks · official answer ready
(f) One of Zara’s friends suggests that the number of squares for a word should be counted. Zara decides that she needs a function to count the number of squares for a word going …
Programming basics · 8 marks · official answer ready
1 Zara wants to write a temperature conversion program. The program is to output a table to show Fahrenheit temperatures and their Celsius equivalents. She writes the program spec…
Programming basics · 8 marks · official answer ready
(a) Write program code to implement the flowchart opposite as the procedure VendingMachine. Programming Language ..................................................................…
Programming basics · 7 marks
(i) PROCEDURE InputScoresAndCalcAverage(BYREF Average : ........................ ) DECLARE ............................................ , .........................................…
Constructs · 8 marks
(ii) PROCEDURE UpdatePointsTotals( ......................................................................... ) DECLARE ............................................................…
Constructs · 7 marks
(d) The social club want a facility to search for a competitor to find their current rank. This is done by searching the array CompetitorData for the competitor’s name. Complete t…
Constructs · 5 marks
(e) At the end of the day, the computer is shut down. Alessio wants to save the data from the array CompetitorData to a new sequential file CompetitorFile.DAT Write program code f…
Constructs · 1 mark
(ii) Suggest where in the given program optimisation may be possible. .............................................................................................................…
Constructs · 1 mark
(ii) Suggest where in the given program optimisation may be possible. .............................................................................................................…
Programming basics · 2 marks · official answer ready
(i) Complete the identifier table: Variable Data type Description MyList ARRAY[1 : 7] OF INTEGER The given list of numbers SearchItem INTEGER The number input [2]
Constructs · 1 mark · official answer ready
(c) Name one other resource which must be managed by the operating system. ........................................................................................................…
