There is no direct way to remove elements from an array, because its size is fixed. Whatever you do, you need to allocate a new array somehow.