type PInt = ^integer; var aa,bb: integer; P2: PInt; begin bb:=8; new(P2); P2^:=23; P2:= @bb; aa:= 7+P2^; bb:=aa-4; write(aa:4,bb:4, P2^:4); readln; end.
type PInt = ^integer; var m,n: PInt; begin new(m); new(n); n^:= 4; m^:= 14; dispose(n); n:=m; m:=nil; write(n^+2*n^); readln; end.
type PAra = ^ array [1..5] of integer; var Ara: PAra; s,i:integer; begin new(ara); s:=0; for i:=0 to 4 do begin ara^[i+1]:= i+random(1); inc(s,ara^[i+1]); end; dispose(ara); write(s); readln; end.
type tara = array [0..3] of integer; PAra = ^ tara; var me:longint; s,i:integer; ara: para; begin me:=memavail; new(ara); s:=0; for i:=3 downto 0 do begin ara^[i]:=i; if i=2 then write(me-memavail:4); write(ara^[i]:4); end; readln; end.
type PAra = array [1..4] of ^integer; var me:longint; s,i:integer; ara: para; begin me:=memavail; s:=0; for i:=1 to 4 do begin new(ara[i]); ara[i]^:= me - memavail; inc(s,ara[i]^); end; write(s:4); readln; for i:=1 to 4 do dispose(ara[i]); end.