235,230 views
29 votes
29 votes
Which of the following correctly declares name to be a character array and stores "William" in it?

A) char name[6] = "William";
B) char name[7] = "William";
C) char name[8] = "William";
D) char name[8] = 'William';

User Venkysmarty
by
2.9k points

1 Answer

17 votes
17 votes

char name[8] = "William"; is the correct answer.

User Steve Johnson
by
3.0k points