>>17
そういうときは

void kansu(unsigned a) {
int *ans = malloc(sizeof(int) * a);
(中略)
free(ans);
}

として、実行時にメモリを確保する