title: Difference between a program that crashes and program that hangs
body: <p>What is the difference (or causes) between a program that crashes and a program that hangs (becomes unresponsive) in C++?</p>
  
  <p>For sure, accessing invalid memory causes a program to crash. Deadlock in threads may cause a program to hang. What are the other causes?</p>
  
  <p>Does exhausting all memory causes a program to hang? or crash? I'm a bit confused between the differences and their causes.</p>