Exercises, examples and other material relating to training module C211. 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
Background
If you want to do something and think "surely that's
been done before", then it probably has been. C is supplied
with a library of standard funcions and header files that save
you the need to rewrite many of the basics that you'll need,
and we'll introduce you to these standard components in this
module. We'll also show you where to find other sources of
code that's already written, and suggest that you might like
to share your work similarly.
Articles and tips on this subject | updated |
4465 | Sockets, time handling and keyboard interrupt handling in C A new example from last week's C course - a simple TCP/IP server that processes one connection at a time, taking a user's input into a "giftbox" and returning the donantion made by the previous person. The scenario is that you may be given wonderful gifts by people - but sometimes they're not wonderful ... | 2015-03-29 |
3244 | C and C++ - preprocess, compile, load, run - what each step is for C and C++ original source code goes through a number of steps on its way to becoming a runnable program.
1. The C Preprocessor is run on the original source. This takes the source lines that start with a # character and acts on them as directed. (It does a bit more too - more about that anon!)
2. ... | 2011-04-12 |
3234 | Your program - you just provide the filling in the sandwich You may think (and say) that you're writing a program ... but you never write a complete program these days. What you do is to provide the filling to the sandwich - the bit that changes from one application / requirement to the next, and you then make use of standard surrounding material - the bread.
On ... | 2011-04-09 |
3148 | OpenGL / C / C++ - an example to get you started A Computer Graphics application in C / C++ - that's the coding that one of my delegates is going to be doing for her "real work" after this week's course, and I found myself looking back to old times - when I used (amongst other things) to subcontract to Silicon Graphics to present courses on their GL ... | 2011-01-26 |
2575 | Sharing variables between files of code in C - extern In C, If you want to share a variable between a number of functions, you can declare it at the top of your file, outside the functions. It's then an element that's held in memory all the time and available to all your functions. Since your functions are separate elements which are joined together at ... | 2010-01-15 |
Examples from our training material
abc.h | include file example for cpp.c |
bathroom.c | Sharing extern variables - a file of functions |
clever.h | Example of included file |
cpp.c | C Preprocessor examples |
ex1.c | use of #define and #include |
first.c | The Sandwich of your application within standard elements |
g2.c | Gift server demonstration |
hash | Sample preprocessor directives |
house.c | Sharing variables between object files - main program |
shared.c | First example of shared code |
ten.c | Preprocessor directive demonstration |
waterhorse.h | extern, and use of preprocessor to control it |
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
The C preprocessor.
locale.h.
stdarg stddef stdio and stdlib.h.
math and limits.h
errno ctype and time.h
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.