>>276
 問題に無理が有るな。
 a[] の要素数が増えるわけだから a[] の領域再確保が必要になるが
指示された関数IFでは無理だ。

void aryins( int** a, int n, int idx, int x);

とすべきだな。