UMBC CS 201, Fall 06
UMBC CMSC 201
Fall '06

CSEE | 201 | 201 F'06 | lectures | news | help


Multi-dimensional Arrays

The declaration

  char board[3][3];

The model as a matrix

Warning: this example shows math notation, NOT C syntax
  board(0,0) board(0,1) board(0,2)
  board(1,0) board(1,1) board(1,2)
  board(2,0) board(2,1) board(2,2)

As we see it

. . .
. . .
. . .

Its actual internal representation

  board(0,0)
  board(0,1) 
  board(0,2)
  board(1,0) 
  board(1,1) 
  board(1,2)
  board(2,0) 
  board(2,1) 
  board(2,2)
. . . . . . . . .

Last Modified - Tuesday, 22-Aug-2006 07:13:55 EDT


CSEE | 201 | 201 F'06 | lectures | news | help