Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Background
How to open, read, write, and close files in C; how to check whether or not a file exists, and how to find out the names of all the files (and subdirectories too) in a directory.
Tips and short articles on this subject
The what and why of C pointers
Reading and writing files in C
New C Examples - pointers, realloc, structs and more
Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
C and C based languages module C210
File Handling
Exercises, examples and other material relating to training module C210. This topic is presented on public courses Learning to Program in C, Learning to program in C++, Programming in C, C and C++ Programming

Learning to Program in C - Conversion to C for experienced programmers. "Programming in C" is an intensive 2 days course, during which our tutor takes ...
http://www.wellho.net/course/clfull.html  [course]
Learning to program in C++ - a conversion course for programmers in other languages This intensive course teaches the C languages, and the C++ language ...
http://www.wellho.net/course/cffull.html  [course]
C and C++ Programming - a conversion course for programmers in other languages This intensive course teaches the C languages, and the C++ language which ...
http://www.wellho.net/course/cafull.html  [course]
Programming in C - Conversion to C for experienced programmers. "Programming in C" is an intensive 2 days course, during which our tutor takes you from ...
http://www.wellho.net/course/cbfull.html  [course]
Every time I program in C, I marvel at how clever the language is ... yet at the same time I curse some of the devices that are used to perform certain ...
http://www.wellho.net/mouth/2002_New ... -more.html  [short article]
/* A file opened with 'open' is accessed in a binary mode ... "read X bytes" stuff. Note that the buffer is one character longer that the maximum read ...
http://www.wellho.net/resources/ex.php4?item=c210/filesinc.c  [code sample]
In C you can use either open or fopen to open a file. open is what you would use for binary files, and you have plenty of low level controls; use fopen ...
http://www.wellho.net/mouth/2571_Rea ... -in-C.html  [short article]

How to open, read, write, and close files in C; how to check whether or not a file exists, and how to find out the names of all the files (and subdirectories too) in a directory.

This topic is presented on public courses Learning to Program in C, Learning to program in C++, Programming in C, C and C++ Programming

Examples from our training material
cmelk.c   Text file read and write
deardir.c   Parsing a directory
ffiles.c   fopen to access files at a higher level
filesinc.c   low level file handling with open
lunches.c   Reading a file and tokenising into a structure
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
stdio.h and other headers.
Files and other streams.
Opening and closing.
Reading and writing.
Checking files and directories.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.


You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2010: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 344596 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho