title: C - Segmentation fault with pointer to array
body: <p>i'm hoping someone can help me with this little piece of code. It's a stupid test, but i dont know what is it that i am doing wrong. It's like this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int **ipp;
  
  int ventas [3][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}};
  
  int main(void){
  
      ipp = (int **)ventas;
  
      printf("%d\n", **ipp);
  
      return 0;
  }
  </code></pre>
  
  <p>It compiles (I'm using GCC), but when I execute it I keep getting a segmentation fault. What am I doing wrong? I think it has something to do with an un-initalized pointer, but 'ventas' is an array so it is already initialized, and it's assigned to **ipp.</p>