- Write a program to create a data file "MARK.DAT" and stores name, address and marks in any three subjects for five students. (Qbasic)
OPEN "MARK.DAT" FOR OUTPUT AS #1
FOR I = 1 TO 5
INPUT "Enter name"; N$
INPUT "Enter address"; A$
INPUT "Enter mark in subject 1"; S1
INPUT "Enter mark in subject 2"; S2
INPUT "Enter mark in Subject 3"; S3
WRITE #1, N$, A$, S1, S2, S3
NEXT I
CLOSE #1
END