This is a multiple selection question Which of the following

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.

Solution

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.

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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site