A

Admin • 833K Points
Coach

Q. Which function is used to read a line of text including spaces from the user in C?

  • (A) scanf()
  • (B) getc()
  • (C) fgets()
  • (D) All of the above
  • Correct Answer - Option(C)
  • Views: 25
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

In C programming language, the fgets() function can be used to read a line of text including spaces from the user.

Syntax:

fgets(variable_name, sizeof(size), stdin);

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.