Q. Which function is used to read a line of text including spaces from the user in C?
β
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);