pointers to 3dimensional array?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bob22
    New Member
    • Jun 2014
    • 1

    pointers to 3dimensional array?

    can anyone please explain me the concept of pointers in multidimensiona l array?
    Code:
    #include<stdio.h>
    #include<conio.h>
    int main()
    {
    int a[2][3][2]={
    					  {
    					  {11,4},
    					  {7,8},
    					  {3,4},
    					  },
                     {
    					  {2,2},
    					  {2,3},
    					  {31,23},
    					  }
    					  };
    printf("%u\n",a);
    printf("%u\n",*a);
    printf("%u\n",**a);
    printf("%u\n",***a);
    printf("%u\n",a+1);
    printf("%u\n",*a+2);
    printf("%u\n",**a+2);
    printf("%d\n",***a+1);
    printf("%d\n",a[1][2][0]);
    printf("%u\n",*(a+1));
    printf("%u\n",*(*(a+0)+2));
    printf("%d\n",*(*(*(a+1)+2)+0));
    getch();
    return 0;
    }
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Read this: http://bytes.com/topic/c/insights/77...rrays-revealed

    Post again if you still have questions.

    Comment

    Working...