\n (Backslash n)

I am writing a function. In it I have a bunch of statements that use the backslash n. I’m wondering why the backslash n goes inside the parenthesis and not out.

The link to the Codecademy project is https://www.codecademy.com/courses/learn-c-plus-plus/projects/cpp-magic-8-ball

The \n character is a newline character. I believe you mean it is inside quotation marks, not parentheses. The reason it is inside the quotation marks is because it is a character, as opposed to endl, which is a manipulator.

See this link for more info.