title: 0xDEADBEEF vs. NULL
body: <p>Throughout various code, I have seen memory allocation in debug builds with <code>NULL</code>...</p>
  
  <pre><code>memset(ptr,NULL,size);
  </code></pre>
  
  <p>Or with <code>0xDEADBEEF</code>...</p>
  
  <pre><code>memset(ptr,0xDEADBEEF,size);
  </code></pre>
  
  <ol>
  <li>What are the advantages to using each one, and what is the generally preferred way to achieve this in C/C++? </li>
  <li>If a pointer was assigned a value of <code>0xDEADBEEF</code>, couldn't it still deference to valid data? </li>
  </ol>