Files in C Not for beginners Shared under Creative Commons License
1. What is a File? (non C introduction) 2. How to handle files in C
File ● A file ● Is Sequence of bytes ● Has certain length ● Is Stored in Hard disk ● Has a name ● Is stored at a particular “path” in the “namespace” – ● E.g. /home/student/Desktop/programs/something.c Has other properties like: permissions, owner, group, etc.
First let us understand the file system namespace