Register
 

Advertisement in just 5$

Engineering, Computer, Scholarship and SEO Support Forum




Author Topic: Which of the following comments regarding the reading of a string, using scanf  (Read 619 times)

Offline mechanic

  • Engineer
  • Hero Engineer
  • *****
  • Posts: 2985
    • View Profile
    • Engineering Forum
Advertisement
Question: Which of the following comments regarding the reading of a string, using scanf (with %s option) and gets, is true?

Options are:

A. Both can be used interchangeably
B. scanf is delimited by end of line, while gets is not.
C. scanf is delimited by blank space, while gets is not.
D. None of the above.

Correct answer is:

C. scanf is delimited by blank space, while gets is not.


Engineering, Computer, Scholarship and SEO Support Forum