Vidyalelo
C++ Programming · Q42

Arrays and Strings in C++

Programming · C++ Programming · question 42

Q42

Which of the following is true regarding the declaration of a string in C++ using the char array?

A.
It can be initialized using the assignment operator
B.
It cannot be modified after initialization
C.
It requires a null character at the end
Answer
D.
It automatically allocates memory for the null character

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board