Skip to main content

Arrays

  • Chapter
A Book on C

Part of the book series: Macmillan Computer Science Series ((COMPSS))

  • 651 Accesses

Abstract

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.

Example 7.1

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’.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 19.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Copyright information

© 1988 R. E. Berry, B. A. E. Meekings and M. D. Soren

About this chapter

Cite this chapter

Berry, R.E., Meekings, B.A.E., Soren, M.D. (1988). Arrays. In: A Book on C. Macmillan Computer Science Series. Palgrave Macmillan, London. https://doi.org/10.1007/978-1-349-10233-4_8

Download citation

  • DOI: https://doi.org/10.1007/978-1-349-10233-4_8

  • Publisher Name: Palgrave Macmillan, London

  • Print ISBN: 978-0-333-46529-5

  • Online ISBN: 978-1-349-10233-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics