Fiveable
Fiveable

Line Break

Definition

A line break is a special character used to insert a new line or start on a new line within a string. In most programming languages, the common escape sequence for creating line breaks is "\n".

Analogy

Think of your favorite song lyrics written on separate lines in order to help you sing along without getting lost. The line break in programming is like pressing enter on your keyboard to start writing on the next line.

Related terms

String Literal: A sequence of characters enclosed in quotation marks (" ") that represents text data.

Escape Character: A character used alongside other characters to represent non-printable or special characters.

Concatenation: The process of combining two or more strings together into one longer string.

"Line Break" appears in:

collegeable - rocket pep

Are you a college student?

  • Study guides for the entire semester

  • 200k practice questions

  • Glossary of 50k key terms - memorize important vocab



© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.