What is size of pointer ?

Sizeof pointer depends on machine architecture & compiler. If your machine is 32 bit the sizeof pointer will return 4 or if machine is 64 bit and compiler 64 bit then sizeof pointer will return 8. Sizeof pointer independet of datatype memory allocation. Because it stores the memory address of a variable not value.

Example:

For 32 bit machine

 

 

Output:

4

4

%d bloggers like this: