If char catname[15]; , which of the following is valid?
-
catname[15] = "Millie";
-
catname = "Millie";
-
catname[ ] = "Millie";
-
None are Valid
D
Correct answer
Explanation
In C/C++, you cannot assign a string literal to an array using array notation after declaration. Option A attempts out-of-bounds assignment, option B tries to assign to the array name directly (not allowed), and option C has invalid empty bracket syntax. String assignment requires strcpy() or similar functions, not direct assignment.