title: How to find if a variable is allocated in stack or heap?
body: <p>Stumbled upon this interview question somewhere,</p>
  
  <p>In C,
  Given a variable <code>x</code>, how do you find out if the space for that variable is allocated on the stack or heap?</p>
  
  <p>(Is there any way to find it out programatically and not having to go through the symbol table, etc? And does finding if the space is allocated in stack or heap has any practical implications?)</p>