Arrays and Pointer Arithmetic

Learn how pointers and arrays are related.

In C++, arrays and pointers are closely related. They share a fundamental connection in how they handle data and memory.

Array name a pointer?

The name of an array in C++ acts as a pointer to its first element. This means that an array name can be used as a pointer to the type of the array’s elements. However, this pointer is constant; you cannot change it to point to another address.