title: wrong output when assigning a number to a struct pointer
body: <p>My struct is</p>
  <pre><code>typedef struct {
  unsigned int size ;
  int * arr ;
  } array_t ;
  </code></pre>
  <p>The function should initialize a struct with the length of a given number.</p>
  <pre><code>void init ( array_t * A, unsigned int size){
    A = malloc(sizeof(array_t));
    A-&gt;arr = calloc(size+1,sizeof(int));
    A-&gt;size = size;
    return;
  }
  </code></pre>
  <p>But when I print the size of the struct in my main function I always get the wrong number.
  How do I assign the right value to size or what did I do wrong?</p>