My question is exactly the same as this one. That is, I\'m trying to use scanf() to receive a string of indeterminate length, and I want scanf() to dyn
scanf()
Don't use scanf for reading strings. It probably doesn't even do what you think it does; %s reads only up until the next whitespace.
scanf
%s