title: Memory allocation of a list within a list in C
body: <p>Is my first time asking a question I'll try to be concise, I am trying to allocate space for a list within a list and access its member afterwards ( int begin int end ).</p>
  <pre><code>typedef struct patient{
      int id_patient;
      int id_medic;
      char name[15];
      float presale;
      struct seq *sequence;
  }patient;
  
  typedef struct seq{
      int begin;
      int end;
      struct seq *next;
  }seq;
  
  struct patient* patient_list;
  patient_list = malloc(sizeof(patient));
  </code></pre>
  <p>However I'm unable to access data in the inside list</p>
  <pre><code>patient_list-&gt;sequence-&gt;begin = 10
  printf(&quot;%d&quot;,patient_list-&gt;sequence-&gt;begin)
  </code></pre>
  <p>The code exits with 0xC0000005, which should be due to how to accessing an illegal zone of memory.</p>
  <p>Why could this be happening? I wrote only the interested code, since the list on top works.</p>