One of the most powerful aspects of C is the relationship between pointers and arrays. In C, the name of an array acts as a pointer to its first element. Scale Factor in Pointer Arithmetic
Unlike regular variables, you cannot perform standard math on pointers. Adding 1 to an integer pointer does not increase its value by 1; instead, it moves the pointer to the next integer location in memory. Kanetkar clarifies how pointer arithmetic depends entirely on the data type the pointer points to (e.g., shifting 4 bytes for an integer vs. 1 byte for a character on standard 32-bit systems). 3. Pointers and Arrays One of the most powerful aspects of C
Adding 1 to a pointer doesn't move it one byte; it moves it by the size of the data type it points to. Adding 1 to an integer pointer does not