Skip to main content

Arrays and Strings

  • Chapter
Programming for Engineers
  • 11k Accesses

Abstract

Compound data structures consist of a possibly variable number of basic data structures. They are given meaning through code. In this chapter, we begin our study of compound data structures with the simplest and most fundamental of all: the array, which consists of a contiguous range of more basic data structures, all of the same type. An array of int data is a typical example. An array is indexable, allowing reading or writing of each of its elements. Besides reading and writing element-wise, iteration over an array can be seen as a fundamental operation; hence, arrays and loops go hand in hand.

One application of arrays is to hold text. Textual data are called strings in programming parlance, and we study them in the second half of this chapter.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 69.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Aaron R. Bradley .

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Bradley, A.R. (2011). Arrays and Strings. In: Programming for Engineers. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-23303-6_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-23303-6_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-23302-9

  • Online ISBN: 978-3-642-23303-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics