What are Arrays?
- An array is a contiguous block of memory that can hold a fixed number of elements of the same data type.
- The elements in an array are accessed using an index, which represents their position within the array. Array indices typically start from 0.
Then what are Strings?
- A string is a sequence of characters, such as letters, digits, symbols, or spaces.
- Strings are typically used to represent textual data in programming languages.
- In many programming languages, strings are immutable, meaning they cannot be changed once created. Operations that appear to modify strings actually create new string objects.