7 introduc4on to arrays contd c allows a programmer to

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: would like to group pieces of similar data (same type) together, rather than declaring a variable for each. • By grouping all data together, in one area of memory, it will make them easier to access and process for both the programmer and computer. 7 Introduc4on to Arrays (cont’d) • C allows a programmer to group related data items into a single composite data structure called an array. • An array is two or more adjacent memory cells. • Each memory cell is an array element. 8 Introduc4on to Arrays (cont’d) • General Form of 1 dimensional array declara4on: data_type array_name[size] • An array is declared using the array name and the number of elements. For example: int testing[10]; The array testing...
View Full Document

This document was uploaded on 03/10/2014 for the course ENGINEER 2sh4 at McMaster University.

Ask a homework question - tutors are online