QBASIC FILE HANDLING PROGRAMS SET QUESTIONS COLLECTION
SEE COMPUTER SCIENCE 2077
SET
1
1.
Write
a program to create a sequential data
file “Employee.dat” to store employees’ name, address, age and gender. [SLC
2066 R]
2.
A
data file “LIB.TXT” consists of Book’s name, Author’s name and price of books.
Write a program to count and display the total number of records present in the
file. [SLC 2066 S]
3.
A
sequential data file “EMP.DAT” contains name, post and salary fields of
information about employees. Write a program to display all information of employees
along with tax amount also.(Tax is 15% of salary) [SLC 2067 R]
4.
A
sequential data file called “student.dat” contains some records under the
fields Name, English, Nepali and computer. Write
a program to add some more records in the same sequential data file.
[SLC 2068 R]
5.
Write a program to view those records from “Employee.dat”
sequential data file having employee’s name, department, appointment data and
salary whose salary is more than Rs 5000. [SLC 2068 S]
6.
A sequential data file “Record.dat” has records with field
name, addres, age and salary. Write a program to display only those records
whose age is greater than 26. [SLC 2070 S]
7.
A data file “Salary.dat” contains the information of employee
regarding their name, post and salary/ Write a program to display all the
information of employee whose salary is greater than 15000 and less than 40000.
[SLC
2071 R]
8.
A sequential data file called “Marks.dat” has stored data
under the field heading Roll No, Name, English, Nepali and maths. Write a
program to display all the information of those students whose marks in Nepali
is more than 50. [SLC
2071 S]
9.
A sequential data file called “Marks.dat” contains NAME, AGE,
CITY AND TELEPHONE fields. Write a program to display all the contents of the
data file. [SEE
2072]
10. Write a program
to store Roll no., Name, Class and Address of any five students. [SEE 2074]
SET
2
1.
Create
a sequential data file “std.dat” to store name and marks obtained in English,
Math and Science subjects for a few students. [SEE MODEL 2065]
2.
Write
a program to store records regarding the information of Book Number, Book’s
name and Writer’s name in a sequential data file called “Library.dat”. [SLC
2065 R]
3.
A
sequential data file called “MARKS.DAT” contains roll no., name, English,
nepali and maths fields. Write a program to display all the contents of data
file. [SLC 2065 S], [SLC 2067 S]
4.
Write a program to create a data file “teldir.dat” to store
name, address and telephone number of employees according to the need of the
user. [SLC
2069 R]
5.
A sequential data file “Staff.dat” contains the name,
address, post and salary of the employees. Write a program to read and display
all the records stored in the above file. [SLC 2069 S]
6.
A sequential data file called “Marks.dat” contains name,
english, nepali, maths and science fields. Write a program to display all the
contents of that data file. [SLC 2070 R]
7.
Create
a data file to store the records of few employees having Name, Address, Post,
Gender and Salary fields. [SEE 2073]
8.
A
data file "STAFF. dat" has stored records of few employees with
EmPID, First name, Lastname, post and salary. Write a program to display all
the records of the employees whose salary is more than 40,000. [SEE 2075]
9.
Write
a program to create a sequential data file "salary.data" to store
programmer's Name, salary and post according to the need of the user. [SEE 2075
S2]
10. A Sequential
data file called "SEE.DAT" has stored data under the field heading
Symbol No., Name, English, Nepali, Maths and Computer. Write a program to
display all the information of those students whose marks in Computer is more
than 80. [SEE 2074 S]
SET
3
1.
Create
a sequential data file ’Price.dat’ to store item name, quantity and Rate also
calculate total amount(total=Quantity X Rate).Program should terminate
according to the user’s choice.
2.
Create
a sequential data file’post.dat’ to store name and marks of any three subjects
also calculate total and percentages only for 15 students.
3.
A
sequential data file “Address.inf” contains serial no, name, address, telephone
and email_id.WAP to record as many records as the user wants. The serial number
should be generated automatically like 5001,5003,5005.
4.
A sequential data
file “STD.TXT” contains name and marks in three different subjects of some
students. Write a program to display only fail student’s records assuming pass
marks 40.
5.
Write a program which reads records from the file
”Result.DAT” having the fields name, and marks of three different subjects and
display only those records whose percentage is greater than 60 and less than
80. Also count the total number of records presenting in that data files.
6.
Write
a program to read all the records from the data file “STUDENT.TXT” and display
all the records where the fields name are unknown.
7.
A data file "pabson.txt" contains
the records composed of the fields like school, principal, address, contact.
Write a program in Qbasic to display records of the schools located in either
Kathmandu or Palpa
8.
A data
file “INFO.DAT” has numerous records in it with name, address age, and
telephone numbers in it. Write a program to read all the records and print
those with address “NEPAL” and age >15
9.
Write
a program in QBASIC to open a sequential data file “EMP.DAT”, which contains
employees records: Name, address and phone number and display all the records
as well as total number of records stored in the file.
10. A sequential data file “SALARY.DAT”
contains the information, Employee-Code, Employee-Name, Post, Basic-Salary.
Write a program to display those records whose Basic-salary is between 10000 to
15000 and Post is ‘OFFICER’.
SET
4
1. A
data file name “EMP.DAT”, contains number of records having fields name, post
and salary. Write a program to count total number of “Manager” in the data
file. (hint: Manager is a post)
2. Write
a program that reads the ”INFO.DAT” file that has several record such as name,
address, gender, post, and salary .The program display those record whose sex
is male and salary more than 10,000 and also the program counts the total
number of records in that file.
3. A
sequential data file’post.dat’ has few records related to name, address,
salary.WAP to display the records whose address begins with ‘S’ or ‘D’
4. Write
a program to open a data file “record.dat” that contains name, address, date of
birth, email and telephone number of some employees. Now display all those
records whose date of birth is in current month.
5. A
sequential data file “Record.dat” has few records related to name, address,
post and DOB(mm/dd/yyyy). WAP to display the records of all those who were born
between 1971 to 1999.
6. Write
a Qbasic program that read the "EMP.DAT" file with Name, Address,
Post and Salary columns from E: drive that has 500 records of employees and
displays only its last 50 records.
7. A
sequential data file has 100 records having field name, class and roll number.
Write a program to display from 50th to 60th records.
8. Write
a program to display the first 10 records from a file named “resource.dat”
having fields name, phone and email.
9. A
data file named “EMP.DAT” contains some records with the fields Code, Name,
Post and Salary. Write a program to print odd position records of the data
file.
10. A
sequential data file named “abc.dat” has several records having fields name,
roll and class. Write a program to copy all the records of class 10 into a
newly created file new.dat.
SET
5
11. A
data file named “record.dat” contains name, age and salary for n number of
persons. Write a program to input a name to search data from a data file. If
the data is not found, then display the message “Data not found in the list”.
12. A sequential data file 'Student.dat' contains
registration number, student name, address and date of birth of some students.
Write a program that asks a user to input a registration number and displays
the record of the particular registration if present.
13. Delete
some records from “neps.dat” file where computer ask user to enter the record,
which is to be deleted. (Fields are name, address, and telephone number)
14. A
sequential data file “RECORD.DAT” contains different records under fields: name
rollno., name, address and percentage. Write a program to edit a record and
display both edited and unedited records on the screen to compare them side by
side.
15. A
sequential data file “marks.dat” contains information such as student’s name,
marks obtained in math, science and computer. Write a program that increase the
marks of computer by 10 of those student who secured less than 40
No comments:
Post a Comment