title: is it necessary to type-cast malloc and calloc
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc">Do I cast the result of malloc?</a>  </p>
  </blockquote>
  
  
  
  <p>I was googling to find out the reason for type-casting of <strong>malloc</strong> and <strong>calloc</strong>. But, i only found <em>type-casting of <strong>malloc</strong> is not necessary since it return void pointer</em> but, what about <strong>calloc</strong>. This is the same reason for <strong>calloc</strong> too ???</p>
  
  <p>Now, if we move back to first point, about return value of <strong>malloc</strong> and <strong>calloc</strong>. Then, i found that, <em>both are returning the allocated spaces</em>. So, i'm little bit confused here. So, my questions are</p>
  
  <blockquote>
    <ol>
    <li><p>What is the return value of <strong>malloc</strong> and <strong>calloc</strong></p></li>
    <li><p>Is it necessary to type-cast <strong>malloc</strong> and <strong>calloc</strong>. And why ?</p></li>
    </ol>
  </blockquote>