title: (array of structure pointer) decay
body: <pre><code>struct Node * leftright(struct Node **head,struct Node *mid)
      {   struct Node *temp=*head;
          struct Node *ret[2];
          ret[0] = malloc(  sizeof(temp));
          ret[1] = malloc(  sizeof(temp)); 
          while((temp-&gt;next)!=mid)
          {
              temp=temp-&gt;next;
  
          }
  
          temp-&gt;next=NULL;
          (ret)-&gt;next=*head;
          ret[1]-&gt;next =mid;
         printList(ret[0]-&gt;next);
         printList(ret[1]-&gt;next);
         return ret[0];
      }
  </code></pre>
  
  <p>In this code , to separate left and right sub list for merge sort.
  I have used array of structure pointers.But why in this case ret is not deacying to the first element.
  If i use (*ret)->next=*head; or  ret[0] code works.</p>
  
  <p>Also if i use "(*ret)->next=*head;" version and use pointer arithmetic "((*ret)+1)->next =mid;" i dont get right list printed.
  I probably suspect that *ret reduces to (*ret)[2].But why this happens and not simple decay is confusing me.</p>
  
  <p>Thanks</p>