program exPointertoPointers;type
iptr =^integer;
pointerptr =^ iptr;var
num: integer;
ptr: iptr;
pptr: pointerptr;
x, y :^word;begin
num :=3000;(* take the address of var *)
ptr :=@num;(* take the address of ptr using address of operator @ *)
pptr :=@ptr;(* let us see the value and the adresses *)
x:= addr(ptr);
y := addr(pptr);
writeln('Value of num = ', num );
writeln('Value available at ptr^ = ', ptr^);
writeln('Value available at pptr^^ = ', pptr^^);
writeln('Address at ptr = ', x^);
writeln('Address at pptr = ', y^);end.