Firstly thanks,
Second, I just want to understand how these corrections work.
fgets(input,sizeof(input),stdin);
I know gets is used for strings but why use it in a single string?
Also stdin, I have no idea what that does, does it involve strings or some type of typical error as a result of gets?
Why do I have to decrement len? Is it for appending reasons?