program DataFiles;type StudentRecord = Record s_name: String; s_addr: String; s_batchcode: String; end;var Student: StudentRecord; f: file of StudentRecord;begin assign(f, 'students.dat'); reset(f); while not eof(f) do begin read(f,Student); writeln('Name: ',Student.s_name); writeln('Address: ',Student.s_addr); writeln('Batch Code: ', Student.s_batchcode); end; close(f);end.
program DataFiles;type StudentRecord = Record s_name: String; s_addr: String; s_batchcode: String; end;var Student: StudentRecord; f: file of StudentRecord;begin Assign(f,'students.dat'); Rewrite(f); Student.s_name := 'John Smith'; Student.s_addr := 'United States of America'; Student.s_batchcode := 'Computer Science'; Write(f,Student); Close(f);end.
program DataFiles;
BalasPadamtype
StudentRecord = Record
s_name: String;
s_addr: String;
s_batchcode: String;
end;
var
Student: StudentRecord;
f: file of StudentRecord;
begin
assign(f, 'students.dat');
reset(f);
while not eof(f) do
begin
read(f,Student);
writeln('Name: ',Student.s_name);
writeln('Address: ',Student.s_addr);
writeln('Batch Code: ', Student.s_batchcode);
end;
close(f);
end.
program DataFiles;
BalasPadamtype
StudentRecord = Record
s_name: String;
s_addr: String;
s_batchcode: String;
end;
var
Student: StudentRecord;
f: file of StudentRecord;
begin
Assign(f,'students.dat');
Rewrite(f);
Student.s_name := 'John Smith';
Student.s_addr := 'United States of America';
Student.s_batchcode := 'Computer Science';
Write(f,Student);
Close(f);
end.
program DataFiles;
BalasPadamtype
StudentRecord = Record
s_name: String;
s_addr: String;
s_batchcode: String;
end;
var
Student: StudentRecord;
f: file of StudentRecord;
begin
assign(f, 'students.dat');
reset(f);
while not eof(f) do
begin
read(f,Student);
writeln('Name: ',Student.s_name);
writeln('Address: ',Student.s_addr);
writeln('Batch Code: ', Student.s_batchcode);
end;
close(f);
end.