Oridinary (automatic) variables in C++ use stack or heap?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap">What and where are the stack and heap?</a>  </p>
</blockquote>



<p>A vary basic question, please forgive my ignorance. Please let me know whether a simple variable declaration in C++ for an ordinary (automatic non-static and non-global) variable for example.... 
float x; within the scope of a function, say main() uses stack or heap (free store) memory?
I am asking this because code such as the one given below works in C++, but not in C.
Thanks in advance.</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

int main()
{ 
    int a,b;
    cin &gt;&gt; a &gt;&gt; b; 
    if(a &lt; b)
    { 
        int c = 1925;
        float d = 0.7;
    }
    else
    {
        double e = 889.7; 
        short f = 35;
    }
    return 0;
}
</code></pre>
