Can you Please elaborate on the part that why we have to declare the output string Dynamically?

Can you Please elaborate on the part that why we have to declare the output string Dynamically?

Hey @coala008 Static memory allocation is done on stack
And stack is of limited size
Sometimes we dont know the space needed in the program and there dynamic allocation can be useful as we do it on rutime

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.