\n new line
\t tab
\b backspace
\" double quote
\' single quote
\? question mark
\\ backslash
This is easier than you think. I'm surprised they didn't offer any examples of any sort. You're going to want to use these in cout statements:
Code:
#include<iostream>
using std::cout;
int main()
{
cout << "This is some text\nWith a newline\ta tab a backspace\b some double quotes\" single\' question make\? a
nd a backslash\\ \n\n";
return 0;
}
Output:
Code:
This is some text
With a newline a tab a backspac some double quotes" single' question make? and a backslash\
The \n, newline goes to the next line before outputting anymore text. The \t places a tab before the next piece of text, the backspace goes back a charcter space (just like pressing backspace), and the quotes and backslash put that particular character in since you can't use them in output by themselves.
Hope that clears something up. If you don't understand one completely, just add a few to that code, and see what happens.