ExamVeda
Login
Home
This question belongs to C Program Arrays And Strings
Arrays and Strings
?

What is the purpose of the fgets function in C?

Answer & Solution
Correct Answer: Option B
The purpose of the fgets function in C is to read a string from the console.

fgets reads a line of text from the specified input stream and stores it into the string pointed to by the provided pointer.

This function is often used to read input from the user via the console.

Therefore, fgets = read a string from the console.
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
SUSANTA SWAIN
SUSANTA SWAIN 2 years ago
please reconsider the answer