For more info on this topic, check out my C++ guide.
As with most of the other C guides, it’s a basic introduction to pointers and arrays. The array is a type that you can hold a bunch of random data in, but it has to be specified how many elements you want to have. Most arrays have a max length of 3, so for example a array of ints would be of type int.
As a beginner, you may not have much idea how to print an array. All you really need to know is that you can print out the content of an array with the  operator, and then the  operator can be used to access the elements.
When you get the hang of C, you can make yourself a little more comfortable with arrays by using the array type operator, as shown in the above example. You can also make your code look more consistent by using the array initializer syntax.
This is another situation where you may not know how to print the content of an array, so it may not make much sense. However, the array type operator has another nice feature that makes it much easier to implement: It also lets you print out the contents of a variable. This is done with the dot operator, as shown here, or with the brackets syntax, which let you print out the contents of any object.
In this example we’re going to print out the contents of a vector. Since this is a C++-specific example, there’s a little bit of extra work that needs to be done. However, once you know how to do it it’s easy to print out a vector of any object type, like a string. We’re going to print out our string value with the print function.
If you are familiar with the dot function, all you have to do is type in the dot operator. You can then type in brackets to print the contents of any object. However, if you want to print the contents of a variable, you have to type in the brackets first.
We use the print function to print out our strings. For printing out a vector of objects, i.e. a string, its just as easy. Just type in the print function and you’re set.
If we were to use the print function, we would be printing out an array of string. However, this is not actually what we want to do so we have to use the dot operator on a string. We also have to put quotes around the dot operator because it is a special character.