Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))

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 and C++, Programming in C, C and C++ Programming, Learning to program in C and C++, C and C++ Programming

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.
Articles and tips on this subjectupdated
4340Simple C structs - building up to full, dynamic example
During the final day of our "Learning to program in C" course - today - we built up an example that introduced structs, then added dynamic memory allocation so that we ended up with a flexible program capable of taking an unlimited amount of data. The build up examples also show (in the last program) ...
4339Command line and file handling in C
A simple new example of command line and file handling from yesterday's C course - [here] - reading all the files named on the command line, and reporting on the length of each of them. It's so easy to go straight from "Hello World" tp a very complex example, and loose all the delegates / readers along ...
3386Adding the pieces together to make a complete language - C
Once we've covered the fundamentals of programming on a C course, we move on to cover pointers, arrays, structures, strings, input/output, and dynamic memory allocation. We teach and illustrate each of them, and we have our delegates write practical exercises to make sure that they have a grasp of ...
3122When is a program complete?
"Code is never completed ... it can always be improved." ... it's one of the most difficult aspects in many projects to say "yes, that does what we want and we should go for a release now rather than continuing to develop until ... until it's so late that we've missed the boat / added too much complexity ...
2572The what and why of C pointers
If you put a "*" in front of a variable name as you declare the variable in C, that variable holds the ADDRESS of a value of the type give, rather than the value itself. Thus:   int bill; /* holds an integer */   int *ben; /* holds an ADDRESS. At that address you'll find an integer ...
2571Reading and writing files in C
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 for text files. When you fopen a file, you'll get back a pointer to a structure of type FILE which you then pass into function such as fgets and fprintf. Each ...
2002New C Examples - pointers, realloc, structs and more
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 actions, which make the code that much more of a 'puzzle' to right. I've finished a 2 day C Programming course today ... and written a whole raft ...
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
sf.c   Reading all the files named on the command line
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 [here].
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 Ruby, Lua, 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.

You can Add a comment or ranking to this page

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

PAGE: http://www.wellho.net/resources/C210.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb