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.
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.
3
Q
What parameter(s) does strlen take?
A
strlen() takes a single c-string as its parameter.
4
Q
A