Advertisement

Arrays and Strings

  • Aaron R. Bradley

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

Memory Cell Unit Test Lowercase Letter Fibonacci Sequence Pointer Arithmetic 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  1. 1.Dept. of Electrical, Computer, and Energy EngineeringUniversity of ColoradoBoulderUSA

Personalised recommendations