1
QuizMultiple Choice

How "Useless" Math Research Made the Internet Safer

Question 1 • Introduction to Computer Science B – 4-232

In the program to evaluate passwords, you gradually built a message to display to the user. What did you add to the end of each message string to start each message on a new line? message = message + "Your password needs an uppercase letter. _____ "

Answer
A
\e
B
\endline
C
\newline
D
\n

Explanation

The escape sequence \n represents a new line in a string. Adding it to the end of the message makes the next message start on a new line, so the correct choice is “\n.”

AI-written and checked against the verified answer.

Next