Lec12 - Lecture 12 Arrays Uses Notation Part I of and need...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture 12 Arrays part I Lecture 12 Arrays Part I Definition of and need for Uses Notation A simple example Character arrays (strings)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Lecture 12 Arrays part I Definition of and need for An array is a list of items numbers or characters or locations in memory Identified by a single variable name and an index or location in the list Needed for repetitive calculations allows using one variable name that can be indexed within a loop avoids using multiple variable names
Background image of page 2
3 Lecture 12 Arrays part I Uses Storing data Manipulating data Analyzing data Creating tables Creating graphs
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Lecture 12 Arrays part I Notation example: the variable a is a one dimensional array of size four 3 2 1 0 a a a a = a Starting with zero index is a C++ “unusual” feature. Got to get used to it! location zero (or index zero) defining an array in C++: type variablename[size of array];
Background image of page 4
5 Lecture 12 Arrays part I A simple example Print a table to the screen
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/26/2008 for the course ENGR 1 taught by Professor X during the Spring '07 term at Lehigh University .

Page1 / 11

Lec12 - Lecture 12 Arrays Uses Notation Part I of and need...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online