explain newline escape sequence with example
Answers
first way..
A newline is a character used to represent the end of a line of text and the beginning of a new line. In programming languages, such as C, Java, and Perl, the newline character is represented as a '\n' escape sequence. ... and move to the next line.
second way...
In C, all escape sequences consist of two or more characters, the first of which is the backslash, \ (called the "Escape character"); the remaining characters determine the interpretation of the escape sequence. For example, \n is an escape sequence that denotes a newline character.
The Line Feed ("LF") character (0x0A, \n) moves the cursor down to the next line without returning to the beginning of the line. This character is used as the new line character in Unix based systems (Linux, macOS X, Android,etc). ... It moves the cursor both down to the next line and to the beginning of that line.