Is it safe to safe that size of pointer will be same as the sizeof datatye used or size of pointer is fixed = 4 or 8 bites

tell me about pointer size as if we print size of pointer pointing to a char variable it will show 1byte as as if we add ptr+1 then thepointer show jump of 1 whereas in case of integer if we do ptr+1 it will show jump of 4 why is it so

Hey Ankush, that’s depends upon type of your pointer if your pointer is of type int then it will take the jump of 4 bytes to the next bucket, if pointer is of type char it will take the jump of 1 byte to the next bucket , so it totally depends on the type of pointer which you take.

and how much space or memory be occupied by any datatye pointer

Hey, it will depend on your system if you have a 32-bit processor, a pointer will occupy 32 bits or 4 bytes. If you have a 64 bit computer, it will occupy 64 bits or 8 bytes.