Arrays

R. E. Berry, B. A. E. Meekings, M. D. Soren · Palgrave Macmillan UK eBooks · 1988

In the examples used so far each data item that we wished to manipulate has been given a name, or identifier. Each identifier has associated with it a type, and a storage class. This association is made explicit through the declaration. But so far any identifier has represented a numeric value of one type or another, or a character. Consider again example 4.3 in which we produced a grade for a given mark. If we now change the specification of the problem, to ask that we produce the number of times that each grade was achieved, the statements in example 7.1 could appear in a suitable loop. While we can contemplate writing this when only five grades are involved, we would, if twenty-five grades were involved, look for a ‘better way’.

Cited by 0 works. doi:10.1007/978-1-349-10233-4_8

Authors