t11CArraysMultiDimensional

t11CArraysMultiDimensional - Arrays Multidimensional Arrays

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

View Full Document Right Arrow Icon
Dale Roberts Arrays Multidimensional Arrays www.kite-legends.blogspot.com
Background image of page 1

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

View Full DocumentRight Arrow Icon
Dale Roberts Multiple-Dimensional Arrays Multiple-Dimensional Arrays Multiple subscripted arrays Multiple subscripted arrays Arrays require at least two subscripts to identify a Arrays require at least two subscripts to identify a particular element particular element ANSI C standard allows at least 12 array subscripts ANSI C standard allows at least 12 array subscripts 2D Arrays 2D Arrays Tables with rows and columns ( Tables with rows and columns ( m m by by n n array) array) Like matrices: specify row, then column Like matrices: specify row, then column Row 0 Row 1 Row 2 Column 0 Column 1 Column 2 Column 3 a[ 0 ][ 0 ] a[ 1 ][ 0 ] a[ 2 ][ 0 ] a[ 0 ][ 1 ] a[ 1 ][ 1 ] a[ 2 ][ 1 ] a[ 0 ][ 2 ] a[ 1 ][ 2 ] a[ 2 ][ 2 ] a[ 0 ][ 3 ] a[ 1 ][ 3 ] a[ 2 ][ 3 ] Row subscript Array name Column subscript A : scalar A[0] : 1D array 1-Dimensional vector A[0][0] : (2 subscripts) 2D array (matrix) 2-dimensional vector A common error is to use math matrix notation a(1,2) www.kite-legends.blogspot.com
Background image of page 2
Dale Roberts Multiple-Subscripted Arrays Multiple-Subscripted Arrays Initialization Initialization int b[2][2] int b[2][2]
Background image of page 3

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

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

This note was uploaded on 12/08/2010 for the course CSE 2017 taught by Professor Kittu during the Spring '10 term at APIIT.

Page1 / 6

t11CArraysMultiDimensional - Arrays Multidimensional Arrays

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

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