title: Dynamic array of linked lists in C
body: <p>Basically I have to store words in linked list with each character having its own node. I get really confused with nested structures. How do I go to the next node? I know i'm doing this completely wrong which is why I'm asking.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  typedef struct node
  {
      char letter;
  }NODE;
  
  
  typedef struct handle
  {
      NODE **arr;
  }HANDLE;
  
  HANDLE * create();
  
  
  void insert(handle **, char, int);
  
  int main(int argc, char **argv)
  {
      FILE *myFile;
      HANDLE *table = (HANDLE *)malloc(sizeof(HANDLE));
      NODE *linked = (NODE *)malloc(sizeof(NODE));
      int counter = 0;
  
      linked = NULL;
      table-&gt;arr[0] = linked;
  
      char c;
  
  
      myFile = fopen(argv[argc], "r");
  
      while((c = fgetc(myFile)) != EOF)
      { 
          if(c != '\n')
              insert(&amp;table, c, counter);
  
          else
          {
              counter++;
              continue;
          }
      }
  }
  
  
  void insert(HANDLE **table, char c, int x)
  {
      (*table)-&gt;arr[x]-&gt;letter = c; //confused on what to do after this or if this
                                    //is even correct...
  } 
  </code></pre>