Code:
PROGRAM dachsach;
USES crt;
TYPE
ds = ^nguoi;
nguoi = RECORD
mhs:BYTE;
Hoten:STRING[25];
Diem:REAL;
tiep:ds;
END;
VAR
dslop,ctcuoi:ds;
i,j:BYTE;
lam:CHAR;

PROCEDURE Hien;
VAR ct1:ds;
BEGIN
clrscr;
writeln('Du lieu da nhap-hien tu cuoi ve dau');
writeln;
ct1:=ctcuoi;
WHILE ct1 <> NIL DO
WITH ct1^ DO
BEGIN
write(mhs,' ',hoten);
FOR j:=1 TO (20-length(hoten)) DO write(' ');
writeln(diem:5:2);
ct1:=tiep;
END;
END;
BEGIN
clrscr;
ctcuoi:=NIL;
i:=0;
REPEAT
new(dslop);;
i:=i+1;
WITH dslop^ DO
BEGIN
writeln('ma so ho so:',i);
mhs:=i;
writeln('Ho va ten: ');readln(hoten);
write('Diem :');readln(diem);
tiep:=ctcuoi;
ctcuoi:=dslop;
writeln('Nhap tiep hay thoi?C/K');lam:=readkey;
writeln;
END;
UNTIL lam IN ['k','K'];
hien;
readln;
END.

=>em ko hiểu chỗ này
Code:
ct1:=ctcuoi;
WHILE ct1 <> NIL DO
WITH ct1^ DO
BEGIN
write(mhs,' ',hoten);
FOR j:=1 TO (20-length(hoten)) DO write(' ');
writeln(diem:5:2);
ct1:=tiep;
END;
===>ct1 := tiep mà tiep nó ko thay đổi thì khi nào ct1 = Nil;????