Skip to study material

DATA STRUCTURES

Unit II · Text and Binary File Pointers

AR25I Year · II SemesterCSE(AIML)25CS12001

Clear answers, algorithms and worked examples for the current syllabus.

10 topics10 two-mark questions10 five-mark questionsSeparate viva questions

20 questions

Open complete unit for printing / PDF

Questions and answers

  1. 01What is a FILE pointer?2 marks
  2. 02Explain files, FILE pointers, opening modes and closing.5 marks
  3. 03Name character and line-based file I/O functions.2 marks
  4. 04Explain character, formatted and line-based text file input/output.5 marks
  5. 05What is one difference between text and binary streams?2 marks
  6. 06Compare text and binary file processing.5 marks
  7. 07What does fwrite return?2 marks
  8. 08Explain fread and fwrite with a binary-file example.5 marks
  9. 09How does a sequential record-file search work?2 marks
  10. 10Explain searching a file-based record database by key.5 marks
  11. 11Why is while (!feof(fp)) usually the wrong read loop?2 marks
  12. 12Explain feof, ferror and clearerr and correct end-of-file testing.5 marks
  13. 13What is the purpose of ftell?2 marks
  14. 14Explain file positioning with fseek, ftell, rewind, fgetpos and fsetpos.5 marks
  15. 15What do argc and argv represent?2 marks
  16. 16Explain argc and argv with a checked numeric-argument example.5 marks
  17. 17What belongs in a shared header for a simple function?2 marks
  18. 18Explain multifile programming, headers, declarations and linking.5 marks
  19. 19What does a+ mean?2 marks
  20. 20Explain append and update streams and safe transitions between reading and writing.5 marks

The 2- and 5-mark labels are practice allocations. Source examination questions retain their actual printed marks.