title: C - Doubly linked list (isEmpty)
body: <p>I have doubly linked list and Ive made a function to check whether the list is empty or not.</p>
  
  <p>Function code:</p>
  
  <pre><code>int isEmpty(list *l)
  {
      if(l-&gt;head== NULL &amp;&amp; l-&gt;tail== NULL)
          return 1;
      else
          return 0;
  }
  </code></pre>
  
  <p>List</p>
  
  <pre><code>typedef struct list
  {
      struct element *head;
      struct element *tail;
  }list1;
  </code></pre>
  
  <p>and Im trying to use this function but there is nothing when i open console</p>
  
  <pre><code>case 11:
              printf("List is : %d\n", isEmpty(&amp;list1));
              break;
  </code></pre>