title: How to find the starting and ending address of Heap memory for a program?
body: <p>Is there any way to find the starting and ending address of heap memory. </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  void main()
  {
      printf("Ending address of Heap: %x\n",sbrk(0)); 
  }
  </code></pre>
  
  <p>The above coding shows the ending address of heap memory. Like that is 
  there any way to find the starting address of heap.</p>
  
  <p><strong>Output:</strong></p>
  
  <blockquote>
    <p>Ending address of Heap: 8556000</p>
  </blockquote>