Thanks Jim...I'm using C on Unix.
Is fgets() a good option? Coz we have to specify the size of the characters, right? What if the user types an extremely long line?
I've been considering scanf, and apparently it can be used like scanf("%[^/n]",abc); (what's surprising is that abc doesn't need an ampersand preceeding it)
Got it from
here
and there are comments about scanf being vulnerable to buffer overflows. Is that true?
So basically, for a user who likes typing long lines, would scanf, fgets or getline be a better option?
In the meantime I'll be trying stdin in place of fp, for getline...