File Handling in QBasic
Q. WAP to store employee's id, name, post and department in a data file EMPINFO.DAT 1. OPEN "EMPINFO.DAT" FOR OUTPUT AS #1 TOP: CLS INPUT "ENTER ID";I INPUT "ENTER NAME"; IN$ INPUT "ENTER POST"; P$ INPUT "ENTER DEPARTMENT";D$ WRITE #1,I,IN$, P$, D$ INPUT "DO YOU WANT TO CONTINUE? Y/N";CH$ IF UCASE$(CH$)="Y" THEN GOTO TOP CLOSE #1 END Q. WAP to write seven customer's name, address, product name and price in sequential data file "product.txt" 2. OPEN "product.txt" FOR OUTPUT AS #1 FOR I = 1 TO 7 CLS INPUT "ENTER CUSTOMER'S NAME"; N$ INPUT "ENTER ADDRESS"; A$ INPUT "ENTER PRODUCT'S NAME"; P$ INPUT "ENTER PRICE" ; P WRITE #1, N$,A$,P$,P NEXT I CLOSE #1 END Q. WAP to store the information o...