Friday, October 8, 2021

QBASIC File Handling Appending Data File Example

Write a program to add some new records in the existing data file STUDENT.DAT. The program should prompt to the user for adding next records. 

CLS
OPEN "STUDENT.DAT" FOR APPEND AS #1
DO
INPUT "Enter Name : "; n$
INPUT "Enter Class : "; c
INPUT "Enter Roll No : "; r
INPUT "Enter Address : "; a$
WRITE #1, n$, c, r, a$
INPUT "Do you want to add more records ? (Y/N) : "; ch$
LOOP WHILE UCASES$(ch$) = "Y"
CLOSE #1
END

No comments:

Post a Comment

If you have any doubts, Please let me know.

[Download PDF] Computer Science Book Gread-10 in Nepali Language

 If you are searching for class 10 Computer Science in Nepali pdf for free download then you are at the right page. This book is soley publi...