2.7 The char Data Type Flashcards

1
Q

How is the char data type used?

A

Used to store individual characters.

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

How many characters can a char data type hold?

A

Only one.

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

How are character literals enclosed in C++?

A

Enclosed in single quotation marks.

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

How are string literals enclosed in C++?

A

Enclosed in double quotation marks.

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

How many byte of memory does the char data type uses?

A

Typically 1 byte of memory.

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

What does the null terminator do?

A

It marks the end of the string.

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

\0

A

Null terminator or null character.

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