10.2 Arrays
22 questions in this subtopic. Open a question to solve it and check the official answer.
Arrays · 1 mark
(ii) Give the correct term for the variable n in the pseudocode expression StockID[n]. ............................................................................................…
Arrays · 11 marks · official answer ready
(a) Write program code for the module StockSummary(). Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment state…
Arrays · 4 marks · official answer ready
(i) The table shows the contents of the three fields in each record stored in the 1D array binaryTree. Complete the table to show the contents of binaryTree from part (a). rootPoi…
Arrays · 4 marks · official answer ready
(i) The table shows the contents of the three fields in each record stored in the 1D array binaryTree. Complete the table to show the contents of binaryTree from part (a). rootPoi…
Arrays · 5 marks · official answer ready
2 (a) A student is learning about arrays. She wants to write a program to: • search through a 1D array of 100 elements • count the number of elements that contain the string “Empt…
Arrays · 6 marks
(ii) The following diagram shows a 2D array that stores the nodes of the binary tree’s linked list. Add the correct pointer values to complete the diagram, using your answer from …
Arrays · 6 marks · official answer ready
(ii) The following diagram shows a 2D array that stores the nodes of the binary tree’s linked list. Add the correct pointer values to complete the diagram, using your answer from …
Arrays · 6 marks
(ii) The following diagram shows a 2D array that stores the nodes of the binary tree’s linked list. Add the correct pointer values to complete the diagram, using your answer from …
Arrays · 1 mark · official answer ready
(i) State the order of the sorted array. ...................................................................................................................................... [1]
Arrays · 1 mark · official answer ready
(ii) State which line of the algorithm you would change to sort the array into the opposite order. State the change you would make. Line ..........................................…
Arrays · 1 mark
6 (a) Individual elements in a 1D array are referenced using an integer variable. For example, using the variable n, an individual element would be referenced in pseudocode as: St…
Arrays · 7 marks · official answer ready
(b) The following pseudocode algorithm performs an insertion sort on the CardData array. Complete the following pseudocode algorithm. 01 ArraySize ← 10 02 FOR Pointer ← 2 TO .....…
Arrays · 4 marks · official answer ready
(ii) The current contents of CardData are shown. Explain how a binary search will find the value 25 in CardData. ..................................................................…
Arrays · 7 marks · official answer ready
(i) Complete the pseudocode to create an empty tree. TYPE Node ....................................................................................................................…
Arrays · 4 marks
19 ENDWHILE 7 (d) To code the ‘Search by product code’ procedure, Ahmed draws a structure chart showing the different stages. The procedure uses the variables shown in the identif…
Arrays · 18 marks
(ii) State two things that built-in and user-defined functions have in common. 1 ..................................................................................................…
Arrays · 4 marks
19 ENDWHILE 7 (d) To code the ‘Search by product code’ procedure, Ahmed draws a structure chart showing the different stages. The procedure uses the variables shown in the identif…
Arrays · 18 marks
(ii) State two things that built-in and user-defined functions have in common. 1 ..................................................................................................…
Arrays · 6 marks
(b) Write the pseudocode equivalent of the structured English. Use the identifiers from the table in part (a). ....................................................................…
Arrays · 6 marks
(b) Write the pseudocode equivalent of the structured English. Use the identifiers from the table in part (a). ....................................................................…
