Computer Science 12th Chapter 14 - File Handling in C Questions Bank

Computer Science 12th Chapter 14 - File Handling in C Questions Bank
Computer Science 12th Chapter 14 - File Handling in C Questions Bank


Computer Science 2nd Year Chapter 14 - File Handling in C Solved MCQs, Important Short Questions and Long Questions Bank

MCQs

Please select the right answer.

1. Which mode opens only an existing file for both reading and writing?





2. ___ function is used as formatted output file function : 





3. ___ is true about a stream :






4. ___ modes can be used to read and write data to and from the data file : 






5. ___ represents the new-line marker :





6. ___assignment statements assigns value to the first element of an array a :





7. ___function is used to read a single character from a file at a time :





8. ___function is used to write a string to a file :





9. ___mode can be used to read data from the data file :





10. A can store text only.





11. A collection of related records is called __________ 






12. A data file a stored in :





13. A file can be closed using _________ funciton 





14. A file is stored in :





15. A logical interface to a file is called ____________. 





16. A sequence of characters from input device to computer is called:





17. A stream can be disassociated from a file using operation:





18. A stream is associated with a file using and ________operaton 






19. A text file is a _________ collection of characters 





20. An array index / subscript must be of data type : 





21. An array script should be:






22. An array subscript should be 





23. fopen() function take _____ parameters 





24. If programs get input data from data file and also send output into data file. It is  called :






25. In binary stream bytes have ______________correspondence





26. In file handling sequence of bytes refers to __________ 





27. In file handling sequence of characters refers to __________ 





28. In text file, data is stored in :





29. In text stream characters have _________ correspondence 






30. In the absolute path of a file we use_______ 





31. In___character conversion





32. On successfully closing a file , the fclose( ) returns : 





33. Pointer is a group of contiguous memory location to store data of same data type. Union





34. The data type of file pointer is :






35. The elements of array abc [10] is numbered from : 





36. The fopen() function uses parameter.





37. The index of an element is written within :





38. There are ___ types of streams





39. To mention end of file point a marker______ is used 






40. To open a file __________ function is used 





41. To open a file for writing if it already exists





42. To store data for future use it must be stored on _____________ 





43. To write a character on a file ________ function is used 






44. To write a character on a file function takes ________ parameters 





45. Which of the following function is used to copy a string to an array of character






46. Which of the following function is used to write a string to a file : 





47. Which of the following functions is used to read character from a file?





48. Which of the following functions is used to write a string to a file?





49. Which of the following is ca consecutive group of memory locations with the  same name and type :





50. Which of the following mode open only an existing file for both reading and  writing :





51. Which one is not a valid parameter of putc() function 





52. Which one is true about pointer type variable 






Short Questions

1. Compare binary and text stream.
2. Define a stream.
3. Define the following file opening modes:
r, W, A, R+, W+, A+
4. Define the stream?
5. Do you know the type of variable that stores memory address?
6. How is the end of text file indicated?
7. List any three ways to write data in text files.
8. Name different opening modes provided by C language.
9. What are different types of streams?
10. What do you mean by text stream?
11. What is a binary stream?
12. What is a file?
13. What is a string?
14. What is a text stream?
15. What is an array?
16. What is binary stream?
17. What is data file?
18. What is EOF marker?
19. What is fclose() function?
20. What is fopen() function?
21. What is getc() function?
22. What is input stream?
23. What is meant by EOF?
24. What is meant by fgets() function?
25. What is Newline marker?
26. What is output stream?
27. What is pointer?
28. What is putc() function?
29. What is stream?
30. What is text file?
31. What is the file pointer?
32. What is the purpose of fclose() function
33. What is the purpose of fgets() function
34. What is the purpose of fopen() function?
35. What is the purpose of fprintf() function
36. What is the purpose of fscanf() function
37. What is the purpose of putc() function
38. What is the use of file pointer?
39. Which access method can access the data directly?

Long Questions

1. How to read from and write character to a file using C language?
2. What is a stream? Also discuss its different types.
3. What are file markers? Explain the use of BOF, EOF and New Line.
4. How to open a file using c language? Also discuss its different file opening modes.
5. How to close a file in c language?
6. How strings are stored and retrieved in c language.
7. What is fputs() function? Explain with the help of an example.
8. What is fgets() function? Explain with the help of an example.
9. How to read from and write to formatted data in a file using c language?

إرسال تعليق (0)
أحدث أقدم