Computer Science, asked by mm7734973, 8 months ago

Difference between Arrays and String​

Answers

Answered by harshkotwani9300
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 sakshamvvip
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