A

Admin • 833K Points
Coach

Q. Which function is used to read a string from the user?

  • (A) gets()
  • (B) scanf()
  • (C) read()
  • (D) fgets()
  • Correct Answer - Option(D)
  • Views: 22
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

'fgets()' is safer and preferred over 'gets()' for reading strings.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.