title: What will happen if heap memory gets full?
body: <ol>
  <li>What will happen in below case?</li>
  <li><p>What will happen if I write <code>if (p == NULL) { break; }</code>?</p>
  
  <pre><code>#include &lt;stdio.h&gt;  
  void main()  
  {  
      int *p;  
      while (1)  
      {  
          p = malloc(1024); // allocating memory in infinite while loop  
          // if (p == NULL) { break; }
      }  
  }  
  </code></pre></li>
  </ol>