By Aaditya Shah
[Subscribe and Comment for more updates]
Saturday, December 28, 2019
9. Write a program to read entire data of the sequential data file "RECORD.DAT" which contains Name , Address , and Phone Number of the employees then display all the records as well as count total number of records stored in the file :-
Ans:-
CLS
OPEN " RECORD.DAT" FOR INPUT AS #1
P = 0
PRINT "NAME ","ADDRESS","PHONE"
WHILE NOT EOF (1)
INPUT #1,N$,A$,P
PRINT "NAME";N$
PRINT"ADDRESS";A$
PRINT "PHONE NUMBER ";P
P = P + 1
WEND
PRINT " TOTAL NUMBERS OF RECORDS ";P
CLOSE #1
END
No comments:
Post a Comment