Two-dimensional arrays and pointers - C Pointer

C examples for Pointer:Array Pointer

Description

Two-dimensional arrays and pointers

Demo Code

#include <stdio.h>

int main(void)
{
  char board[3][3] = {
                       {'1','2','3'},
                       {'4','5','6'},
                       {'7','8','9'}
                     };/*w  w  w .  jav a  2 s  .c om*/

  printf("address of board        : %p\n", board);
  printf("address of board[0][0]  : %p\n", &board[0][0]);
  printf("value of board[0]       : %p\n", board[0]);
  
  return 0;
}

Result


Related Tutorials