cstring library Flashcards

1
Q

Can you use cstring library functions on std::string objects?

A

No.

The library functions only work on c-strings. You would have to convert std::string objects to c-strings first.

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

What does the strlen() function do?

A

Returns the length of a string.

It only returns the number of characters between the beginning of the string and the null character regardless of how large the c-string’s actual capacity is.

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

What parameter(s) does strlen take?

A

strlen() takes a single c-string as its parameter.

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