πŸ“Š C Programming
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) fgets()

Explanation: 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);

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);

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
222
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
93%
Success Rate