How to determine how much space a struct takes
<p>Consider the following program :</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;
struct x
{
    int i;
    char a;
    double b;
    char w;
};
int main()
{
    cout&lt;&lt;sizeof(x);
    return 0;
}
</code></pre>

<p>According to me the output should be 14, but I'm getting 20 as the result??</p>
