malloc(int size) will return a contiguous block of memory size bytes in length, but there's no guarantee that successive calls will allocate memory that is immediately after the previously allocated block.
This probably answers the question in more detail: Will successive calls to malloc allocate space directly after the previous call in c?