Pointer Operation
The following pointer operations are allowed:
- Adding an integer to a pointer, e.g., p + 2.
- Subtracting an integer from a pointer, e.g., p - 1.
- Subtracting two pointers, e.g., p1 - p2.
- Comparing pointers using relational operator, e.g., p1 >= p2.
-
p+1 means the address of the next cell of type which p is pointing to, I.e., if *p is p[0], then *(p+1) is p[1].