domingo, 10 de noviembre de 2013

The Escape Sequence

Character and string literals have certain peculiarities, like the escape codes. These are special characters that are difficult or impossible to express otherwise in the source code of a program, like newline (\n) or tab (\t). All of them are preceded by a backslash (\). Here you have a list of some of such escape codes: 


  • \n- newline
  • \r - carriage return
  • \t - tab
  • \v - vertical tab
  • \b - backspace
  • \f  - form feed
  • \a - alert (beep)
  • \ ' - single quote ( ' )
  • \" - double quote ( " )
  • \? - question mark (?)
  • \\ - backslash (\)

No hay comentarios.:

Publicar un comentario