Input / Output - Programming

Q1:

Out of fgets() and gets() which function is safe to use?

A gets()

B fgets()

ANS:B - fgets()

Because, In fgets() we can specify the size of the buffer into which the string supplied will be stored.