Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which escape sequence takes the cursor to the beginning of the current line ?

  • A.\n
  • B.\r
  • C.\a
  • D.\t

Answer: B

The escape sequence that takes the cursor to the beginning of the current line is \r, option (B). It is the carriage return character, which moves the cursor back to the first column of the line it is on, without moving down. The sequence \n, option (A), is the newline, which moves to the start of the next line. The sequence \a, option (C), sounds the alert or bell. The sequence \t, option (D), moves the cursor to the next tab stop. Only \r returns to the start of the same line.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.