title: Why is the string inside my struct a random letter/number?
body: <p>Whenever I assign a string in my struct to a name and print out the name it just shows random letters and numbers.</p>
  
  <pre><code>typedef struct Per {
       char *name;
       char sex;
       struct Person *father;  
       struct Person *mother;
       Dllist children;
  } * Person;
  
  Person newPerson(char * name) {
       Person p = malloc(sizeof(struct Per));
  
       p-&gt;name = strdup(name);
       p-&gt;sex = ' ';
       p-&gt;father = NULL;
       p-&gt;mother = NULL;
       p-&gt;children = new_dllist();
  }
  
  //in main
  Person p = newPerson("BOB");
  printf("%s\n", p-&gt;string);
  </code></pre>
  
  <p>it should be printing "BOB" but instead prints out "G", "Px", "0i".</p>