title: Segmentation fault using scanf for float ** type
body: <p>I'm trying to code a function that would ask the user to enter matrix. It prompts the number of lines, the number of columns and then prompts the value for each element of the matrix:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  void enterMatrix(float ** matrix, int nbLines, int nbColumns){
      for (int i = 0; i &lt; nbLines * nbColumns; i++){
          printf("i = %d? ", i);
          scanf("%f", matrix[i]);
      }
  }
  
  int main(void){
      int nbLines, nbColumns;
      printf("nbLines? "); scanf("%d", &amp;nbLines);
      printf("nbColumns? "); scanf("%d", &amp;nbColumns);
      float *matrix[nbL * nbCol];
  
      enterMatrix(matrix, nbLines, nbColumns);
  }
  </code></pre>
  
  <p>Everything works fine until I enter a value for <code>i = 0</code> and then press <kbd>enter</kbd>, which leads to a segmentation fault.</p>
  
  <p>Any idea as to what could be wrong?</p>