title: how to check if a linked list is empty
body: <p>I'm new to C and have a question.</p>
  
  <p>How would I check if a linked list is empty?</p>
  
  <p>I have a struct _node </p>
  
  <pre><code>typedef struct _node{
      int data;
      struct _node *next;
  }node;
  </code></pre>
  
  <p>If I have initialized <code>node *list</code>, but didn't do anything to it (i.e didn't assign <code>list-&gt;data</code> a value), how would I check if it's empty?</p>
  
  <p>I tried <code>if (node == NULL){break}</code> but didn't work.</p>
  
  <p>Thanks for the help!</p>