Get the value of the first element in two dimensional array with pointer - C Pointer

C examples for Pointer:Array Pointer

Description

Get the value of the first element in two dimensional array with pointer

Demo Code

#include <stdio.h>

int main(void)
{
  char board[3][3] = {
                       {'1','2','3'},
                       {'4','5','6'},
                       {'7','8','9'}
                     };/*from   w  w w  .  j  av  a2s  .  c  o  m*/

  printf("value of board[0][0] : %c\n", board[0][0]);
  printf("value of *board[0]   : %c\n", *board[0]);
  printf("value of **board     : %c\n", **board);  

  return 0;
}

Result


Related Tutorials