title: what happens when we call Malloc with negative parameter?
body: <blockquote>
    <p>7.22.3.4 The malloc function The malloc function allocates space for an object whose size is specified by size and whose value is
    indeterminate.</p>
  </blockquote>
  
  <p>Prototype: <code>void *malloc(size_t size);</code></p>
  
  <p>I tried passing a negative value as a parameter: <code>malloc(negative)</code> returns <code>NULL</code>.</p>
  
  <p><strong>Is it because the [size_t] negative converted to unsigned [some big value] and cannot allot required space or is the function checking parameter and returns <code>NULL</code>?</strong></p>
  
  <p>If its getting converted to big positive, then when calling <code>malloc(INT_MIN+2)</code> it still returns <code>NULL</code>, but <code>malloc(0)</code> alloted to pointer and <code>*p = somevalue</code> works. What about this?</p>
  
  <p>Is it implementation defined?</p>
  
  <p>Read this link:<a href="https://stackoverflow.com/questions/2022335/whats-the-point-in-malloc0">malloc(0)</a></p>