Value of i is stored in memory as follows.. As i is an int, it has 4byte memory allocation.(byte is separated by comma).
The address of the byte 00000001 (last one) is stored in iptr. As iptr is an int pointer, if we increase the value of iptr by one, address changes in 4 bytes.
Data type char has only 1 byte memory location. Therefore, if we increase the character pointer value by one, address changes in 1 byte.
(char*)iptr --> Address of 0000001 (last one)
*((char*)iptr) --> Value of 0000001 only as char stores only one byte. Therefore value is 1.
(char*)iptr + 1 --> char pointer is increased by one. Therefore this has the address of 0000001 (before the last one)
*((char*)iptr +1) --> Value of the stored value. As earlier it is 1.