Home QBASIC C Java HTML
  • More Courses
  • MCQs
  • Blog Download
  • Tools
  • Contact

    Write a program to create a data file "marks.dat" and store name and marks in three subjects of five students (Class 10 SEE)

    Posted on 2021-02-28

    QBASIC File Handling 

    Write a program to create a data file "marks.dat" and store name and marks in three subjects of five students.

    CLS
    OPEN "marks.dat" FOR OUTPUT AS #1
    PRINT "Enter the Name and Marks of 5 Students"
    FOR i = 1 TO 5
        PRINT "*-*-Student"; i
        INPUT "Enter Name : "; n$
        INPUT "Enter Marks in Subject 1 : "; m1
        INPUT "Enter Marks in Subject 2 : "; m2
        INPUT "Enter Marks in Subject 3 : "; m3
        WRITE #1, n$, m1, m2, m3
    NEXT i
    CLOSE #1
    END
    


    528