No, you can't. You can't change the size of an array on the stack once it's defined: that's kind of what fixed-size means. Or a global array, either: it's not clear from your code sample where myarray is defined.

You could malloc a 1000-element array, and later resize it with realloc. This can return you a new array, containing a copy of the data from the old one, but with extra space at the end.