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
Question
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
Solution
The most appropriate function for reading in a multi-word string is gets(). This function allows you to input a string with multiple words, unlike scanf() which stops reading input after the first whitespace. puts() and printf() are used for output, not input.
Similar Questions
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.
StringsWhich of the given function is more appropriate for reading in a multi-word string including spaces?Optionsscanf()gets()getchar()puts()
Which of the following function is more appropriate for reading in a multi-word string in c?
Scanner nextLine() _____________ the next newline (\n).Group of answer choicesstops beforereads
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.