MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following function is more appropriate for reading in a multi-word string?
A
puts()
B
gets()
C
printf()
D
scanf()
Explanation: 

Detailed explanation-1: -The correct option is (b). Explanation: The function gets() is used for collecting a string of characters terminated by new line from the standard input stream stdin. Therefore gets() is more appropriate for reading a multi-word string.

There is 1 question to complete.