The pointer is interpreted differently according to where "const" is specified.
In this example, the object (*p) indicated by the pointer cannot be changed. The pointer itself (p) can be changed. Therefore, the result becomes as shown below and the pointer itself is mapped to RAM (section B).
In this example, the pointer itself (p) cannot be changed. The object (*p) indicated by the pointer can be changed. Therefore, the result becomes as shown below and the pointer itself is mapped to ROM (section C).
In this example, the pointer itself (p) and the object (*p) indicated by the pointer cannot be changed. Therefore, the result becomes as shown below and the pointer itself is mapped to ROM (section C).