A 1D array, Product, of type STRING is used to store information about a range of products

Question:

A 1D array, Product, of type STRING is used to store information about a range of products in a shop. There are 100 elements in the array. Each element stores one data item.
The format of each data item is as follows:

– ProductID is a four-character string of numerals
– ProductName is a variable-length string
The following pseudocode is an initial attempt at defining a procedure, ArraySort, which will perform a bubble sort on Product. The array is to be sorted in ascending order of ProductID. Line numbers have been added for identification purposes only.

The pseudocode contains a number of errors.
Copy and complete the following table to show:
– The line number of the error
– The error itself
– The correction that is required. [8]
Note:
– If the same error occurs on more than one line, you should only refer to it ONCE.
– Lack of optimisation should not be regarded as an error.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: