HOTs Questions

1.Write a program that copies one file to another. Has the program to take the file names from the users? Has the

program to refuse copy if there already is a file having the target name?

Read more  

 

2.Write a program that appends the contents of one file to another. Have the program take the filenames from the

user.

Read more

 

 3.Write a program that reads character from the keyboard one by one. All lower case characters get store inside

the file LOWER, all upper case characters get stored inside the file UPPER and all other characters get stored

inside OTHERS.

Read more  

 

 4.Write a program to search the name and address of person having age more than

    30 in the data list of persons.

5.What are input and output streams? What is the significance of fstream.h file?
Read more

 

6.What are the steps involved in using a file in a C++ program?

Read more

 

 7.Describe the various classes available for file operations.

Read more

 

 8.Discuss the two methods of opening a file within a C++ program. When is one method preferred over the other?

Read more

 

9.How many file objects would you need to create to manage the following situations? Explain

(i) to process three files sequentially

(ii) to merge two sorted files into a third file

Read more

 

 10.Both ios::ate and ios::app place the file pointer at the end of the file when it is opened. What then, is the difference between them?

Read more

 

11.When a file is opened for output what happens when

(i) the mentioned file does not exist.

(ii) the mentioned file does exist.

Read more

 

12.When do you think text files should be preferred over binary files?

Read more
Rate Us
error: Content is protected !!