title: define a function returning struct pointer
body: <p>Please bear with me, i m from other language and newbie to c and learning it from <a href="http://c.learncodethehardway.org/book/learn-c-the-hard-way.html">http://c.learncodethehardway.org/book/learn-c-the-hard-way.html</a></p>
  
  <pre><code>struct Person {
      char *name;
      int age;
      int height;
      int weight;
  };
  
  struct Person *Person_create(char *name, int age, int height, int weight)
  {
      struct Person *who = malloc(sizeof(struct Person));
      assert(who != NULL);
  
      who-&gt;name = strdup(name);
      who-&gt;age = age;
      who-&gt;height = height;
      who-&gt;weight = weight;
  
      return who;
  }
  </code></pre>
  
  <p>I understand the second Person_create function returns a pointer of struct Person. I don't understand is(may be because i m from other language, erlang, ruby), why does it define it as </p>
  
  <pre><code>struct Person *Person_create(char *name, int age, int height, int weight)
  </code></pre>
  
  <p>not </p>
  
  <pre><code>struct Person Person_create(char *name, int age, int height, int weight)
  </code></pre>
  
  <p>and is there other way to define a function to return a structure?</p>
  
  <p>sorry if this question is too basic.</p>