title: In C, what exactly happens when you pass a NULL pointer to strcmp()?
body: <p>I have read that the following results in undefined behavior. </p>
  
  <pre><code>strcmp(foo, NULL); 
  </code></pre>
  
  <p>But what exactly happens "underneath the hood," so to speak? Is <code>foo</code> compared to garbage data? Is <code>NULL</code> dereferenced? What are the details that cause "undefined behavior"?</p>