Escape sequences Flashcards

(15 cards)

1
Q

\

A

Put a backslash in a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

\’

A

Put a single quote in a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

\”

A

Put a double quote in a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

\a

A

ascii bell when its output to the command line you hear a sound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

\b

A

ascii backspace deletes the character immediately before it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

\f

A

ascii formfeed drops the output on to the next new line with an indent equal to where it would have been on the previous line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

\n

A

ascii linefeed creates a new line in a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

\N{name}

A

Character called name in Unicode database- allows us to use non-standard characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

\r

A

Carriage return- here the characters after the escape sequence replace the text at the start of the string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

\t

A

Horizontal tab adds 8 spaces in a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

\uxxxx

A

The character with 16-bit hex value xxxx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

\Uxxxxxxxx

A

Character with 32-bit hex value xxxxxxxx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

\v

A

ASCII vertical tab- does the same as \f and moves us on to the line underneath our text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

\ooo

A

Character with octal value ooo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

\xhh

A

Character with hex value hh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly