[ad_1]
sizeof gives you the number of bytes the array occupies, not the number of elements it consists of. So as a double requires 8 bytes on your system, the result should become clear.
[ad_2]
solved Reading garbage instead of segfault for non-existant memory locations