title: when passing head of linked list to function.Why do we need to pass it by reference of reference such as in push(node* &head, int key)
body: <p>Printed out the address of head and &amp;head:
  head:0x603050
  &amp;head :0x7fffffffe4b8: what does this signify?</p>
  
  <pre><code>void push(node* &amp;head,int key)// Inserts items at front of link list
  {
      node* linkNode=new node(); //declares new node
      linkNode-&gt;data=key;
      if(head==NULL)             //if the link list is empty then create a new one.
      {
          linkNode-&gt;next=NULL;
          head=linkNode;   //1
      }
      else
      {
          linkNode-&gt;next=head;
          head=linkNode;
      }    
  }
  </code></pre>
  
  <p>Main function where all other functions are called from
  link list is 8,4,2
  main function</p>
  
  <pre><code>int main(int argc, char** argv) 
  {
      node* head=NULL;         //initializing head to NULL
      push(head,2);           //creating link list
      push(head,4);           //this requires &amp;head
      push(head,8);           //link list is 8,4,2
      selectSort(head);        //this does not require &amp;head
      reverse(head);          //this requires &amp;head
      return 0;
  }
  </code></pre>