int lvl1 = 0;
int lvl2 = 0;
int lvl3 = 0;
void inc3(int *arr, int val)
{
lvl3++;
arr = (int *)realloc(arr, sizeof(int) * lvl3);
arr[lvl3 - 1] = val;
}
void inc2(int **arr, int val)
{
lvl2++;
arr = (int **)realloc(arr, sizeof(int) * lvl2);
inc3(arr[lvl2 - 1], val);
}
void inc1(int ***arr, int val)
{
lvl1++;
arr = (int ***)realloc(arr, sizeof(int) * lvl1);
inc2(arr[lvl1 - 1], val);
}
void main()
{
int ***arr = NULL;
inc1(arr, 10);
}