Friday, December 27, 2019

13. Write a program to create a sequential data file “RESULT.DAT” to store name of students , class , section and roll number according to the user need :-

Soln.

CLS
OPEN “RESULT.DAT” FOR OUTPUT AS #1
DO
INPUT “Enter name”; N$
INPUT “Enter class ”; C
INPUT “Enter section ”; S$
INPUT "Enter roll no. " N
WRITE #1, N$, C,S$,N
INPUT” Do you want to add more records (Y/N)”;CH$
LOOP WHILE  CH$=”Y”
CLOSE #1
END

No comments:

Post a Comment

File Handling

Introduction:- Data are used in all the programs for retrieving information. In QBASIC you can store data in a separate file called a da...