title: Printing a Singly Linked List
body: <p>I have a problem with this function.  When I call it, the clients should be printed from the last (tail), to the first (head).  </p>
  
  <p>The problem is that I want to print them from the first (head) to the last (tail).  Everything that I have tried has either resulted in a segmentation fault or prints only the first client.</p>
  
  <p>Note that the program is about a bank.  I have a queue of customers that I want to print in order.</p>
  
  <p>Thank you in advance!        </p>
  
  <pre><code>void printAll(clientData* tail) {
      clientData *current;
      current = tail;
      if (current == NULL) {
          printf("There is no client in queue\n");
          return ;
      }
      while (current != NULL) {
          printf("%s %s %d/%d/%d %s %s %s %s\n",
              current-&gt;firstname,
              current-&gt;lastname,
              current-&gt;birthday.day,
              current-&gt;birthday.month,
              current-&gt;birthday.year,
              current-&gt;bankaccount,
              current-&gt;telephone,
              current-&gt;email,
              current-&gt;bankcommand);
  
          current = current-&gt;next;
      }
      return;
  }
  </code></pre>