Mutable versus immutable arrays
Typically, languages that are based on the C language share many of the same fundamental characteristics. For example, in C the size of a plain array cannot be changed once the array has been created. Since the four languages we are examining here are all based on C, the arrays we will be working with also have a fixed length in. However, although the size of an array cannot be changed, the contents of the structure can change after the array is created.
So, are arrays mutable or immutable? In terms of mutability, we say that plain C arrays are immutable because the structure itself cannot change once it has been created. For this reason, it is typically a bad idea to use a plain C array for anything other than static datasets. This is because, whenever the dataset changes, your program will need to copy the modified data into a new array object and dispose of the old one, which are both costly operations.
Most of the array objects you will be working...