The "\n" in C is an escape sequence, representing a newline character. It is used for output operations, file processing and moving text to the next line.
Use\n in C\n
Question: \n in C is What?
Answer: \n is an escape sequence in C, representing a newline character.
Details:
In C, a newline character moves text to the next line. Newlines can be represented using the \n escape sequence.
When using \n, you need to pay attention to the following points:
Example:
The following code prints two lines of text using \n line breaks:
<code class="cpp">#include <iostream> using namespace std; int main() { cout << "Hello" << endl; cout << "World" << endl; return 0; }</code>
The above is the detailed content of How to use \n in c++. For more information, please follow other related articles on the PHP Chinese website!