To add to what M-Badger has said, you can't "insert" a value into an array at any point, unless you either throw away an element, or allocate a new, bigger array to put it in - which isn't a trivial operation, and which needs to be planned out pretty carefully or it can get very inefficient and wasteful (to the point of crashing your app).
When you allocate an array inside a function in C, the memory for the arry comes from the stack which is a small area of memory that gets allocated when the function execution starts and deallocated automatically when it exits - you cannot expand that space at all because the area allocated and released is always a specific size which is determined at compile time and which can;t be changed.
If you want to allocate a bigger array, you need to allocate both the original and the new array on the heap (using
malloc
) and then copy'n'insert the data. If you do want to do that have a look here:
List<T> - Is it really as efficient as you probably think?[
^] - it's not showing you C code to do it, but it explains what the system does for C# code under the same circumstances, and why that means it can be spectacularly inefficient if you aren't careful!