This is a multiple selection question. Which of the following is true about Cstr
ID: 3937084 • Letter: T
Question
This is a multiple selection question.
Which of the following is true about Cstrings?
There is an implicit assumption that they are nullterminated, but this is usually left to the programmer to enforce.
Space for Cstrings is allocated automatically.
Cstrings are a proper type.
Using functions from <cstring> on Cstrings that are not nullterminated has unpredicatable results.
The function strcpy(str1, str2) copies the characters in str2 to str1 after first checking to make sure that str1 has enough allocated memory to receive them.
The function strlen(c) returns the number of characters allocated to c.
Explanation / Answer
In the following points the true statements about cstrings are
The function strcpy(str1, str2) copies the characters in str2 to str1 after first checking to make sure that str1 has enough allocated memory to receive them.
The function strlen(c) returns the number of characters allocated to c.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.