Q:

Explain how whitespace characters are handled in the string input operator and in the getline function

0

Explain how whitespace characters are handled in the string input operator and in the getline function.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

*Whitespace characters* include space, newline and tab.

The `string` input operator `<<` will regard all three kinds of whitespace characters as delimiter, so the string read from the operator will contain no whitespace characters.

The `getline` function will regard only the newline character as delimiter, so the string read from `getline` function will contain no newline character but may contain space or tab.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now