> b is allocated on the stack. it is just 4 bytes (sizeof(void*)) on a 32
bit
platform.
so yes, there are 4 bytes on the stack and 40 on the heap.
I am sorry to correct you, but this is not true. When using
int b [10] = {1,2,3,4,5,6,7,8,910};
there is no other object representing 'b' other than the array itself -
adress of b (&b) points to the same location as &( b[0] ), but it has
different type. I suggest reading some basic documentation about how arrays
work in C / C++.
Regards
Ondrej