title: Explain stack overflow and heap overflow in programming with example?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/214741/what-is-a-stack-overflow-error">What is a stack overflow error?</a>  </p>
  </blockquote>
  
  
  
  <p>Can any one tell me how and why stack overflow and heap overflow actually occur in programs,  and how to overcome stack overflow in programming - how to avoid it?</p>