Difference between Arrays and String
Answers
Answered by
2
Answer:
Difference between Array and String. The main difference between the two is that arrays can have any data type of any length while strings are usually ASCII characters that are terminated with a null character '\0'. Both are very different in terms of how they are being implemented in various programming languages.
Answered by
1
Answer:
Explanation:
Arrays are also known as lists in other languages
string is simple text enclosed in quotes
example - "hello", 'hello' both of them are strings
in c++ however they are different
"" are used for string and '' are used for characters
arrays are used to store multiple items
like in python example of list is a = [1,2,3,4]
Similar questions
English,
6 months ago
World Languages,
6 months ago