DATA STRUCTURES
Unit II · Text and Binary File Pointers
Clear answers, algorithms and worked examples for the current syllabus.
Questions and answers
- 01What is a FILE pointer?2 marks
- 02Explain files, FILE pointers, opening modes and closing.5 marks
- 03Name character and line-based file I/O functions.2 marks
- 04Explain character, formatted and line-based text file input/output.5 marks
- 05What is one difference between text and binary streams?2 marks
- 06Compare text and binary file processing.5 marks
- 07What does fwrite return?2 marks
- 08Explain fread and fwrite with a binary-file example.5 marks
- 09How does a sequential record-file search work?2 marks
- 10Explain searching a file-based record database by key.5 marks
- 11Why is while (!feof(fp)) usually the wrong read loop?2 marks
- 12Explain feof, ferror and clearerr and correct end-of-file testing.5 marks
- 13What is the purpose of ftell?2 marks
- 14Explain file positioning with fseek, ftell, rewind, fgetpos and fsetpos.5 marks
- 15What do argc and argv represent?2 marks
- 16Explain argc and argv with a checked numeric-argument example.5 marks
- 17What belongs in a shared header for a simple function?2 marks
- 18Explain multifile programming, headers, declarations and linking.5 marks
- 19What does a+ mean?2 marks
- 20Explain append and update streams and safe transitions between reading and writing.5 marks
No matching questions. Change the search or marks filter.
The 2- and 5-mark labels are practice allocations. Source examination questions retain their actual printed marks.