Refer the sample code Here

We know that a pointer can hold an address. In our example,

Pm – is holding the address of memory in stack segment

Pgx – is holding the address of the memory in the data segment

Pint – is holding the address of the memory in the heap segment

PFun – is holding the address of the memory (Starting address or base address of the void PrintNo(int x) ) in the code segment.

Pfun?

That is function pointer, I will write about it later. There is a nice movie in HBO, I will spend sometime there.

Below is the Illustration of memory segment and variable involved in our sample.


Pic02.JPG