+ 1
What is difference between string str="string"; and char str[50]={'s','t','r','i','n','g'}; ?
2 Answers
+ 3
Atleast one difference is that you can change characters of an array, but you can't change strings after creation.
+ 1
Char array is just an array which contains different characters. Char is a primitive data type.
String is 0 or more characters. For example in java string is a class.