Also I have this doubt, that in character arrays at one index we can store just one character while in strings at one index we can store a sequence of characters?
What is the difference between a string and a character array?
@isingh
Thats not at all the case. A string is a sequence of characters. Its a character array only but you can manipulate it more freely. Thus at a discrete index, you can store only one character in a string as well as a character array. However, if you consider the case of an array of strings, then in that case, you can store multiple characters(i.e a single string) at a distinct index of the array.
If my explanation is able to answer your query, please mark the doubt as resolved
ok so a string array is different. a
@isingh
Yes, a string is like a single sentence while an array of strings is a collection of sentences.