Which of the following function is more appropriate for reading in a multi-word string? ans. scanf() printf() gets() puts()
Question
Solution 1
The most appropriate function for reading in a multi-word string in C is gets()
.
Here's why:
scanf()
: This function reads the input from the user until it encounters a whitespace. So, it's not suitable for multi-word strings.printf()
: This function is used to print the output, not t 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? ans. scanf() printf() gets() puts()
Which of the following function is more appropriate for reading in a multi-word string? gets() puts() scanf() printf()
Which of the following function is more appropriate for reading in a multi-word string? ans. gets() puts() printf() scanf()
Which of the following function is more appropriate for reading in a multi-word string?ans.puts()scanf()gets()printf() Previous Marked for Review Next
Which of the following function is more appropriate for reading in a multi-word string?