arrays in C++

C++
string cars[4] = {"Volvo", "BMW", "Ford", "Mazda"};int foo [] = { 16, 2, 77, 40, 12071 };int myArray[] {2, 4, 6, 8, 10};
// scrittura
myArray[3] = 123; // {2, 4, 6, 123, 10};
// lettura
int a = myArray[2]; // a = 6;int leng = 10;
double X[leng];
Source

Also in C++: