Q:

How can I change the size of an array in C?

I am experimenting a little bit with gamestudio.
I am making now a shooter game.
I have an array with the pointer's to the enemies. I want. to when an enemy is killed. remove him from the list. And I also want to be able to create new enemies.
Gamestudio uses a scripting language named lite-C. It has the same syntax as C and on the website they say, that it can be compiled with any C compiler. It is pure C, no C++ or anything else.
I am new to C. I normally program in .NET languages and some scripting languages,

A:

You can't.  This is normally done with dynamic memory allocation.
// Like "ENEMY enemies[100]", but from the heap
ENEMY* enemies = malloc(100 * sizeof(ENEMY));
if (!enemies) { error handling }

// You can index pointers just like arrays.
enemies[0] = CreateEnemy();

// Make the array bigger
ENEMY* more_enemies = realloc(enemies, 200 * sizeof(ENEMY));
if (!more_enemies) { error handling }
enemies = more_enemies;

// Clean up when you're done.
free(enemies);

A:

Arrays are static so you won't be able to change it's size.You'll need to create the linked list data structure. The list can grow and shrink on demand.   

A:

Once an array in C has been created, it is set.  You need a dynamic data structure like a Linked List or an ArrayList

