[go: up one dir, main page]

0% found this document useful (0 votes)
19 views2 pages

Questions From File Handling For Program File

The document outlines tasks related to file handling in programming, including creating text and binary files, writing data, and performing various operations such as counting characters, words, and lines, as well as searching, updating, and deleting records in binary files. Each task is structured with a menu and user-defined functions (UDFs) for clarity. The document emphasizes the need for proper comments in the code for better understanding.

Uploaded by

greenroseb15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Questions From File Handling For Program File

The document outlines tasks related to file handling in programming, including creating text and binary files, writing data, and performing various operations such as counting characters, words, and lines, as well as searching, updating, and deleting records in binary files. Each task is structured with a menu and user-defined functions (UDFs) for clarity. The document emphasizes the need for proper comments in the code for better understanding.

Uploaded by

greenroseb15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

QUESTIONS FROM FILE HANDLING FOR PROGRAM FILE: Q1 CREATE A TEXT FILE.

WRITE A FEW LINES OF DATA ON IT . NOW FIND AND PRINT


1.NUMBER OF CHARACTERS IN FILE . 2. NUMBER OF WORDS IN FILE. 3. NUMBER
OF LINES IN FILE 4. EXIT

Q2CREATE A TEXT FILE. WRITE A FEW LINES OF DATA ON IT . NOW FIND AND
PRINT
1.NUMBER OF LOWERCASE CHARACTERS IN FILE . 2. NUMBER OF UPPERCASE
CHARACTERS IN FILE. 3. NUMBER OF DIGITS IN FILE 4. EXIT

Q3CREATE A TEXT FILE. WRITE A FEW LINES OF DATA ON IT . NOW FIND AND
PRINT:
1. NUMBER OF LINES BEGINNING WITH A VOWEL 2. NUMBER OF LINES ENDING
WITH A VOWEL
3. NUMBER OF LINES BOTH BEGINNING AND ENDING WITH A VOWEL 4. NUMBER
OF WORDS BEGINNING WITH A VOWEL 5. NUMBER OF WORDS ENDING WITH A
VOWEL 6. NUMBER OF WORDS BOTH BEGINNING AND ENDING WITH A VOWEL 7.
EXIT
ALL WILL HAVE A MENU AND UDF'S WITH PROPER COMMENTS

BINARY FILE HANDLING Q1.THE BINARY FILE MUST CONTAIN DATA ABOUT
EMPLOYEES : EMPLOYEE CODE ,EMPLOYEE NAME, EMPLOYEE
DEPARTMENT ,EMPLOYEES SALARY AND WORK ON THE SAME DATA THE SAMPLE
DATA OF AT LEAST 10 EMPLOYEES MUST EXIST IN THE FILE.
1. CREATE A BINARY FILE
2. READ THE DATA FROM THE BINARY FILE
3. APPEND NEW DATA AT THE END OF THE FILE
4. SEARCH FOR A PARTICULAR NAME STORED IN THE BINARY FILE
5.UPDATE PARTICULAR NAME STORED IN THE BINARY FILE AFTER SEARCHING IT
6.DELETE A PARTICULAR NAME FROM THE BINARY FILE AFTER SEARCHING IT
7. FIND THE TOTAL NUMBER OF RECORDS STORED IN THIS BINARY FILE AND
DISPLAY THE SAME
8.EXIT
Q2.1.CREATE A NEW FILE
2.WRITE DATA ON TO IT (LIST)
3.READ FROM THE FILE AND DISPLAY THE DATA (LIST) 4. COPY DATA TO ANOTHER
FILE AND PRINT
5.EXIT

You might also like