C programming file operations for beginners