If I was using C gets(), and I was reading a string from the user, but I have no idea how big of a buffer I need, and the input could be very large. Is there a way I can det
Not with gets(). Use fgets() instead.
gets()
fgets()
You cannot safely get user input with gets().
You need to use fgets() (or fgetc()) in a loop.
fgetc()