Assignment 7-A

File Processing System

Build programs that read, write, and process both text and binary files, implementing a complete file-based data management system.

4-5 hours
Intermediate
100 Points
What You'll Practice
  • fopen, fclose, fread, fwrite
  • Text file operations
  • Binary file operations
  • File error handling
  • Random access with fseek
01

Tasks

1
Text File Analyzer

Create text_analyzer.c that:

  • Opens a text file and counts: characters, words, lines
  • Finds the longest line
  • Counts vowels and consonants
  • Creates a summary report file
2
File Copy Utility

Create file_copy.c that:

  • Copies any file (text or binary)
  • Shows progress during copy
  • Handles large files efficiently
  • Verifies copy by comparing sizes
3
Student Database (Binary)

Create student_db.c that stores student records in binary:

  • Add new student record
  • Display all records
  • Search by roll number
  • Update a specific record
  • Delete a record
4
Log File Manager

Create log_manager.c that:

  • Appends timestamped entries to log file
  • Displays last N entries
  • Searches for entries containing keyword
  • Clears old entries (older than X days)
02

Submission

assignment-7-files/
├── text_analyzer.c
├── file_copy.c
├── student_db.c
├── log_manager.c
├── sample.txt (test file)
└── README.md
03

Grading Rubric

CriteriaPoints
Text File Analyzer25
File Copy Utility20
Student Database (Binary)35
Log File Manager20
Total100