Addition of an address by a constant integer value i.e. ptr +5 means address of cell which is 5 * sizeof(*ptr) away from ptr.
does this mean, say if we are standing at address 2054 and I add 5 to it, the output I will get now is 2059?
Doubt in theory
final address = (base address) + (number * size of data type)
Here pointer variable ptr will store the base address
So what exactly will be added to the base address will depend on the data type of the pointer variable.
Considering it as an integer pointer
ptr = ptr + 5 * (sizeof(integer))
= 2054 + 5 * (4)//Taking size of integer as 4 bytes
= 2054 + 20
= 2074