Which of the following function is more appropriate for reading in a multi-word string in c?
Question
Solution 1
The most appropriate function for reading in a multi-word string in C is fgets()
.
Here's why:
scanf()
stops reading input as soon as it encounters a space, so it's not suitable for multi-word strings.gets()
can read multi-word strings, but it's dangerous because it doesn't check the Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study prob
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI StudyGPT is a powerful AI-powered study tool designed to help you to solv
Similar Questions
Which of the following function is more appropriate for reading in a multi-word string in c?
Which of the following function is more appropriate for reading in a multi-word string?
Which of the following function is more appropriate for reading in a multi-word string?
Which of the following function is more appropriate for reading in a multi-word string? ans.
Which of the following function is more appropriate for reading in a multi-word string?ans.