A Qbasic Program To Find The Certain Record In A Data File.

  • A sequential data file "std.dat" contains name, class and roll of a student. Make a program to display certain records in the file according to the roll no. supplied. (qbasic code)
  • CLS
    OPEN "std.dat" FOR INPUT AS #1
    INPUT "Enter the roll number of the required student:"; rn
    PRINT "Name", "Class", "Roll"
    DO WHILE NOT EOF(1)
        INPUT #1, n$, cl, r
        IF r = rn THEN
            PRINT n$, cl, r
        ELSE
        END IF
    LOOP
    CLOSE #1

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.