, , - .
( malloc
) ( libc) ( ) . , , , , .
char x[5];
int y;
short z;
Raw memory: (just an example, likely to vary)
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
b0000000 xx xx xx xx xx -- -- -- yy yy yy yy zz zz -- --
xx, yy zz x, y z, - . x[4]
, x+sizeof(x[0])*4
( C: , ), b0000004
. x[8]
, b0000008
, y
. x[8]
, y
!
( , ):
char x[5];
int y;
short z;
y = 0x12345678;
x[8] = 0xad;
x[9] = 0xde;
printf("%#x\n", y);