Question related to this: How can I read an input string of unknown length?
Several questions:
What does the line if(!str)return str
mean?
Why is int ch
an integer? Isn't it supposed to be a char?
What is the purpose of the size
given to the function exactly?
Asking in a separate question because I understood the method, just not some of the stuff under the hood.