C

Chandani • 9.82K Points
Tutor III

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

Explanation by: Chandani
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.


Question analytics