Friday, October 18, 2019

160. Qbasic sequential file handling to display all the contents of that data file

160.A sequential data file called 'ADDRESS.DAT' contains NAME, AGE, CITY and TELEPHONE fields. Write a program to display all the contents of that data file.
OPEN "ADDRESS.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
  INPUT #1, A$, B, C$, D
    PRINT A$, B, C$, D
WEND
CLOSE #1
END

No comments:

Post a Comment