Top

Discussion

Which of the following function is more appropriate for reading in a multi-word string?

  • A.scanf()
  • B.printf()
  • C.gets()
  • D.puts()

Answer: C

The C library function gets() reads a line from stdin and stores it into the string pointed to by str.

No comment is present. Be the first to comment.
Loading…

Post your comment