Two-Dimensional arrays: pointer of pointer for its element : Multi Dimensional Array Pointer « Array « C Tutorial

Home
C Tutorial
1.Language
2.Data Type
3.String
4.printf scanf
5.Operator
6.Statement
7.Array
8.Function
9.Structure
10.Pointer
11.Memory
12.Preprocessor
13.File
14.Data Structure
15.Search Sort
16.Wide Character String
17.assert.h
18.ctype.h
19.math.h
20.setjmp.h
21.signal.h
22.stdio.h
23.stdlib.h
24.string.h
25.time.h
26.wctype.h
C / ANSI-C
C++
C++ Tutorial
Visual C++ .NET
C Tutorial » Array » Multi Dimensional Array Pointer 
7.11.2.Two-Dimensional arrays: pointer of pointer for its element
#include <stdio.h>

int main(void)
{
  char board[3][3{
                       {'1','2','3'},
                       {'4','5','6'},
                       {'7','8','9'}
                     };

  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;
}
value of board[0][0] : 1
     value of *board[0]   : 1
     value of **board     : 1
7.11.Multi Dimensional Array Pointer
7.11.1.Two-Dimensional arrays and pointers
7.11.2.Two-Dimensional arrays: pointer of pointer for its element
7.11.3.Get the values in a two-dimensional array through array pointer
7.11.4.Get values from multidimensional arrays with pointers
7.11.5.Declaration of outer block and inner block
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.