Memory Usage estimation
<p>I am wondered about the memory usage of variables and I tried this :</p>

<pre><code>#include &lt;iostream&gt;

int main()
{
    char* testChar1 = "Hi";
    char* testChar2 = "This is a test variable";
    char* testChar3 = "";

    std::cout &lt;&lt;sizeof(testChar1)&lt;&lt;std::endl; 
    std::cout &lt;&lt;sizeof (testChar2) &lt;&lt;std::endl; 
    std::cout &lt;&lt;sizeof(testChar3)&lt;&lt;std::endl;
}
</code></pre>

<p>output is :</p>

<pre><code>4
4
4
</code></pre>

<p>I think I am not doing the right thing. I want to know how much memory every variable uses in stack .</p>

<p><strong>EDIT 1</strong></p>

<p>At the same time if I does <code>char* testChar3 = NULL</code>; the program crashes. So does it mean there is no memory usage for the same?</p>
