By Aaditya Shah
[Subscribe and Comment for more updates]
Saturday, December 28, 2019
12.A data file named “INFO.dat” contains Name of Staff,, Post and Basic Salary. Write a program to count and display total number of records in a file :-
Ans :
CLS
OPEN “INFO.DAT” FOR INPUT AS #1
C=0
WHILE NOT EOF(1)
INPUT #1, N$, D$, P$, S
C=C+1
WEND
PRINT “Total number of records=”; C
CLOSE #1
END
No comments:
Post a Comment