white space characters and scanf
I am studying for an exam at the moment (my first one for eng computing) and I came across this in my lecture notes:
'Care must be taken when reading characters as such with
scanf( ) as the 'white space' characters, viz. blank, tab (\t)
and newline (\n) are valid characters for the %c conversion.'
Correct me if I'm wrong but I understand that 'white space' is any multiple of blank, tab or new line spaces (so anything that is not occupied by characters basically i.e pressing spacebar, tab or enter whilst entering the input character stream).
What confuses me is how could blank, tab and newline be "valid characters" for conversion? What exactly does this mean? Could someone please provide an example to explain this?
I mucked around a bit and if I had two, character type variables declared and I entered "\n 5" into the input character stream, then the two variables are assigned \ and n respectively. I think I am interpreting this information the wrong way.