0% found this document useful (0 votes)
4 views

data file handling

Uploaded by

darshan20071
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

data file handling

Uploaded by

darshan20071
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CHAPTER 12

DATA FILE HANDLING

One marks questions:


1. What is a stream? (U)
2. Name the streams generally used for file I/O. (U)
3. What are output streams? (U)
4. What are input streams? (U)
5. What is a data file? (U)
6. Write the member functions belonging to fstream class. (U)
7. What is ifstream class? (U)
8. What is ofstream class? (U)
9. Write any one member function belong to ofstream class. (U)
10. Write any one member function belong to ifstream class. (U)
11. Name the stream class for file input in C++. (U)
12. Name the stream class for file output in C++. (U)
13. Mention the types of file. (U)
14. What is text file? (U)
15. What is binary file? (U)
16. What is the use of ios :: in? (U)
17. What is the use of ios::out? (U)
18. What is the use of ios::app? (U)
19. What is the use of write( ) function? (U)
20. What is the use of writeln( ) function? (U)
21. What is the use of get( ) function? (U)
22. What is the use of put( ) function? (U)
23. What is the use of getline( ) function? (U)
24. What is the use of read( ) function? (U)
25. What is the use of seekp( ) function? (U)
26. What is the use of seek( ) function? (U)
27. What is the use of eof( ) function? (U)

Two marks questions:


1. Name the streams generally used for file I/O. (U)
2. What are input and output streams? (U)
3. Mention the methods of opening file within C++. (U)
4. Write the member functions belong to fstream class. (U)
5. Differentiate between ifstream and ofstream classes. (K)
6. Differentiate between read( ) and write( ) functions. (K)
7. Differentiate between get( ) and getline( ) functions. (K)
8. Write the member functions associated with ofstream class. (U)
9. Write the member functions belong to ifstream class. (U)
10. Name the stream classes supported by C++ for file input and output. (A)
11. What are the advantages of saving data in binary file? (U)
12. What are the advantages of saving data in Text file? (U)
13. Which are the character I/O operations used in files? (U)
14. Why are get() and put()functions used? (U)
15. What is the use of seekg( ) and seekp() functions? (U)
16. Why are tellg( ) and tellp( ) member functions used? (A)
17. What is significance of fsream.h header file? (A)
18. Differentiate between ifstream and ofstream classes. (K)
19. Explain any two file modes. (U)
20. Differentiate between ios::in and ios::out. (U)

Three marks questions:


1. What is a stream? Name the streams generally used for file I/O. (U)
2. Write the member functions belong to fstream class. (U)
3. Explain: a. get( ) b. getline( ) c. read( ) (U)
4. Mention the three modes of opening a file. (U)
5. Explain get( ) in data files. (U)
6. Explain put( ) in data files. (U)
7. Explain write( ) member function. (U)
8. Explain read( ) member function. (U)
9. Explain close( ) member function. (U)
10. Write the syntax and example of close( ). (U)
11. Explain different file modes. (K)

Five marks questions:


1. What is a data file? Explain different types of data files. (U)
2. Explain input and output operations on text files. (U)
3. What are basic operations on binary files in C++? (U)
4. What is a file pointer? Explain the different member functions
to manipulate data files. (A)
5. Define the following terms: a. get( ) b. getline( ) c. read( )
d. write( ) e. put( ) (U)
6. Define the following terms: a. eof( ) b. seekg( ) c. seekp( )
d. tellg( ) e. tellp( ) (U)

You might also like