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.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Corresponding author
Rights 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)