Program to count number of spaces-newline characters in file


Question 1) Write a program to read and write student records from text file “Student.txt”.

Question 2) Write a program to read and write employee records from binary file “emp.dat”.

• using structures

• using classes

Question 3) Write a program that opens a file “message.txt” and displays its contents.

Question 4) Write a program to copy the contents of the file “abc.dat” to “xyz.dat”.

Question 5) A binary file “stu.dat” contains student records.

Write a program to create a binary file “stusort.dat”, which contains all the records of “stu.dat” in the sorted order of roll number.

Question 6) Write a program to count number of employee records in a binary file “emp.dat” whose department number is 10.

• using structures

• using classes

Question 7) Write a program to search a given employee record by employee number or name in a binary file using structures / classes.

Question 8) There are 100 records present in a file with the following structure:

Sturct item
{

int itemcode, qty;

char itemname[20];

};

Write a program to read these records and arrange them in ascending order of item code and write them in target file separately.

Question 9) Write a program to modify a given employee record in a binary file using structures / classes.

Question 10) Write a program to delete a given employee record in a binary file using structures / classes.

Question 11) Write a program to count the number of characters, alphabets, vowels and consonants in a file “poem.txt”.

Question 12) Write a program to count the number of words and lines in a file “poem.txt”.

Question 13) Write a program to count number of spaces, tabs and newline characters in a file“Notes.txt”.

Question 14) Suppose that a text file named TEXT1.TXT already contains some text written into it, write a program that reads file TEXT1.TXT and create a new file named TEXT2.TXT,which shall contain only those words from the file TEXT1.TXT which don’t start with an uppercase vowel ( i.e. with ‘A’, ‘E’, ‘I’ , ‘O’, ‘U’).

Question 15) Write a program which takes “story.txt” as input file and creates a new file “story1.txt” by replacing all the spaces with “-“, tabs by “%” and newlines by “$”.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Program to count number of spaces-newline characters in file
Reference No:- TGS04923

Expected delivery within 24 Hours