Friday, October 18, 2019

176. Qbasic sequential file handling to isplay the first 10 records from a file named “resource.dat” having fields name, phone and email.

176.Write a program to display the first 10 records from a file named “resource.dat” having fields name, phone and email.

OPEN "RESOURCE.DAT" FOR INPUT AS #1
CLS
FOR I = 1 TO 10
  INPUT #1, N$, C, R
PRINT N$, C, R
NEXT I
CLOSE #1
END

No comments:

Post a Comment