These two lines can be combined:

```c
oldarray = memmove(temparray, newarray, sizeof(temparray));
```