Q:

memory allocation in x86 Assembly language

I was learning about SIZEOF and TYPE operators yesterday. While doing that, I created an array,
Array QWORD 1h,2h,3h,4h,5h

and in .code section, I wrote,
MOV eax, SIZEOF Array

After assembling this, it's awkward that I got only 28 bytes allocated for array (using visual studio community 2015). I saw the values of registers in debugging session.
My question here is, each QWORD occupies 8 bytes of memory. Then, why didn't I get SIZEOF Array as 40?
Even worse.
When I run this,
Array QWORD 1h

it gave me 8 bytes as expected
Array QWORD 1h,2h

Gives me 10..!!
And,
Array QWORD 1h,2h,3h 

Gives me 18..!!
And so on...

A:

By default, Visual Studio's register window shows hexadecimal numbers. Could it be that you are confusing 28 with 0x28? 0x28 is the same as 40. (Similarly, 0x10 is 16, 0x18 is 24, and so on.)

