Possible Duplicate:
Why is the `gets' function is dangerous? Why should not be used?
I am propting user to input a string using fgets() which will be analysed using scanf() for distinguishing integers, floats and chars.I want a reliable program but i'm getting the following warning using gcc:
In function main':
: warning: the
gets' function is dangerous and should not be used.
Can anybody tell me why it is dangerous and what is the safe alternative to it? If someone can tell me the gravity of fatalness of fgets() , it would be really helpful.