>>276
void aryins( int a[], int n, int idx, int x)
{
if (idx < 0 || idx > n - 1) {
return;
}
#ifdef USE_MEMCPY
memcpy(&a[idx + 1], &a[idx], sizeof(int) * (n - 1 - idx));
#else
for (int ic = n - 1; ic > idx; ic--) {
a[ic] = a[ic - 1];
}
#endif
a[idx] = x;
}
>>283
設問を見る限り、要素数が増えることを考慮する必要はなさそうに見えるが?