Learn C Programming

Lesson 4 of 9 · Arrays

Module 9 · Arrays

Two Dimensional Arrays and the Grid

Free with an accountReading

Kenji keeps his chess board in one array of 64 boxes. To find row 3, column 5, he works out 3 x 8 + 5 in his head. He says one long array is faster. He has also made it 27, twice in one game.

Sign in to read

This lesson is free, with an account

An account costs nothing and opens every lesson in this track that is not marked Pro, on every device you read on.

What is inside Two Dimensional Arrays and the Grid

  1. A grid is an array of rows
  2. The nested walk, row by row
  3. Short rows and the zero-fill rule
  4. Reading a grid and summing each row
  5. The two diagonals of a square grid
  6. Transposing a square grid in place
  7. One long line of boxes