ITM 207 Lecture 8: Intro to Array Variables and Data Files

52 views4 pages

Document Summary

Homogeneous collection of items in which an individual item (shares the same name) is accessed by its position (index) within the collection. As data being read into array, a counter is updated so we always know how many data items were sorted. Many values in an array can be processed in a counting loop: body of the counting loop operates on a single element, each element of the array is ultimately processed during loop execution. Has 4 elements numbered from 1 to 4; name of the array is score," values of the arrays not show. Used when programs model data laid out as a grid or matrix. Have 2 indexes separated by a comma [#. #: numbers in the square brackets are the row and column. Attempting to access an element with index higher than any other assigned element will cause a run-time error. Size of the array in both dimensions is determined by the highest index.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents