A Program To Update The Marks (Qbasic Code)

  • A sequential data file "std.dat" contains name, class and roll no., marks of english and science of a student. Make a program to update marks in english and science. (assuming only one record) (Qbasic Code)
  • CLS
    OPEN "std.dat" FOR INPUT AS #1
    OPEN "temp.dat" FOR OUTPUT AS #2
    INPUT #1, n$, cl, r
    INPUT "Enter marks in english:"; en
    INPUT "Enter marks in science:"; sc
    WRITE #2, n$, cl, r, en, sc
    CLOSE #1, #2
    KILL "std.dat"
    NAME "temp.dat" AS "std.dat"
    END

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.