Take the following code :
int *p = malloc(2 * sizeof *p); p[0] = 10; //Using the two spaces I p[1] = 20; //allocated with malloc before. p[2] = 30; //U
This all goes back to C letting you shoot yourself in the foot. Just because you can do this, doesn't mean you should. The value at p+3 is definitely not guaranteed to be what you put there unless you specifically allocated it using malloc.