Strings in C | Q - 4

Last Updated :
Discuss
Comments

Which of the following correctly declares a string in C?


char name = "John";

string name = "John";

char name[] = "John";

char name ={ 'J', 'o', 'h', 'n', '\0' };

Tags:
Share your thoughts in the comments