if you are interested to contribute your LAB PROGRAM Please send mail to jkumaron@gmail.com

Pointer and there sizeof value in c/c++

char *a;

Tutorial answer:1,2

Debugging solution:
Sizeof():it gives no of bytes taken by its operand.
P is character pointer which needs one byte for storing its value.hence
Sizeof(*p)->sizeof(**p)->sizeof(p).result is one1.
Pointer it has two bytes.
So Sizeof(p)->sizeof(*p)->result is 2

Related post