Pointer/Offset Notation with the Built-In Array’s Name as the Pointer

The built-in array name can be treated as a pointer and used in pointer arithmetic. For example, the expression

*( b + 3 )

also refers to the element b[3]. In general, all subscripted built-in array expressions can be written with a pointer and an offset. In this case, pointer/offset notation was used with the built-in array’s name as a pointer. The preceding expression does not modify the built-in array’s name; b still points to the built-in array’s first element.

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.