Simple, in the provided scenario:
- char is 1 byte long
- int (in your platform) is 4 bytes long
The ++ operator increments the pointer by the size of the pointed type.
More Related Contents:
- How to deal with c-string pointers [closed]
- Regular cast vs. static_cast vs. dynamic_cast [duplicate]
- Is segmentation fault actual undefined behavior when we refer to a non-static data-member
- Return array in a function
- Are arrays Pointers? [duplicate]
- Are there benefits of passing by pointer over passing by reference in C++?
- NULL vs nullptr (Why was it replaced?) [duplicate]
- What can I use instead of the arrow operator, `->`?
- How to avoid memory leaks when using a vector of pointers to dynamically allocated objects in C++?
- Determine the size of a C++ array programmatically?
- What is the ‘this’ pointer?
- difference between a pointer and reference parameter?
- C++ Is it possible to determine whether a pointer points to a valid object?
- Pointers in c++ after delete
- How are iterators and pointers related?
- Difference Between *(Pointer + Index) and Pointer[]
- What is the purpose of allocating a specific amount of memory for arrays in C++?
- Is storing an invalid pointer automatically undefined behavior?
- How to know if a pointer points to the heap or the stack?
- C++: Is it safe to cast pointer to int and later back to pointer again?
- What happens when you deallocate a pointer twice or more in C++?
- Casting pointer to Array (int* to int[2])
- Why can’t I add pointers?
- Casting between void * and a pointer to member function
- Dereferencing deleted pointers always result in an Access Violation?
- Difference between const. pointer and reference?
- Function returning array but main showing garbage [duplicate]
- dereferencing a pointer when passing by reference
- Why is arr and &arr the same?
- Is a Linked-List implementation without using pointers possible or not?