X hits on this document

239 views

0 shares

0 downloads

0 comments

3 / 63

Copyright ©2004 Pearson Addison-Wesley. All rights reserved.

8-3

Array Terminology (1)

An array is a collection of two or more adjacent memory cells that are:

The same type (i.e. int)

Referenced by the same name

These individual cells are called array elements

To set up an array in memory, we must declare both the name and type of the array and the number of cells associated with it

double x[8];

This instructs C to associate eight memory cells with the name x; these memory cells will be adjacent to each other in memory.

You can declare arrays along with regular variables

double cactus[5], needle, pins[7];

Document info
Document views239
Page views239
Page last viewedTue Jan 24 15:07:35 UTC 2017
Pages63
Paragraphs754
Words4119

Comments