Shailendra B. answered 06/26/19
Software technical lead with 28 years experience in Embedded/Linux/C
Your question is not clear. One way to allocate a run-time buffer based on input size is to use a pointer and allocate memory on heap via the malloc/calloc calls. The pointer will point to this allocated heap memory block e.g.
void *pointer;
pointer = malloc(input_size);