pointer problem

could any one tell why the following is showing segmentation fault while using **ptr
but working fine using **a

#include<stdio.h>

main()
{

  int a[3][3]= \{                                                                                                                                          
               1,2,5,                                                                                                                                     
               4,5,6,                                                                                                                                     
               8,9,0                                                                                                                                      
               \};                                                                                                                                         
  int **ptr;                                                                                                                                              
                                                                                                                                                          
  ptr = a;                                                                                                                                                
                                                                                                                                                          
  printf\("%d\\n" , **ptr\);                                                                                                                                 

}

/usr/local/bin/gcc -Wall -Werror ptr.c -o ptr
ptr.c:4: warning: return type defaults to `int'
ptr.c: In function `main':
ptr.c:7: warning: missing braces around initializer
ptr.c:7: warning: (near initialization for `a[0]')
ptr.c:13: warning: assignment from incompatible pointer type

Try compiling with full warnings. They actually help.

Multi-dimensional arrays are a bit tricky in C.

#include<stdio.h>

int main(int argc,char **argv)
{
    int a[3][3]={
        {1,2,5},
        {4,5,6},
        {8,9,0}
    };
    typedef int slice[3];
    slice *ptr;

    ptr=a;

    printf("%d\n" , **ptr);

    return 0;
}