Exercises, examples and other material relating to training module C203. 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] |
When you're in a loop there are occasions you want to say get me our of this loop NOW, or "I'm done with the current iteration. And those are the 'classic' ... http://www.wellho.net/mouth/962_Brea ... uages.html [short article] |
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] |
When writing a program, you'll often want to repeat a block of code, counting up through a table or performing a block of code with an input value (loop ... http://www.wellho.net/mouth/1220_for ... -etc-.html [short article] |
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] |
In this module, we study conditional statements like if and
else that you use in C to have parts of your code run only if
certain conditions are true, and loops such as while and for
while provide the facilities through which you get parts of your
code to repeat a number of times, or until a certain condition
is met.
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
| cb.c | Using { and } to scope a block |
| demo.h | Function prototypes for err.c and otherbits.c demo |
| eer.c | Program that makes use of ANSI C function prototypes |
| ex_203.c | Exercise - throw a die until you get a 6 |
| makefile | makefile for module C203 |
| otherbits.c | Functions used in function prototype demo (ANSI C) |
| sindol.c | Singapore Teapot answer |
| sindy.c | Singapore teapot in C |
| tall.c | Temperature conversions using if |
| tall2.c | Temperature conversions using switch |
| tall3.c | Temperature conversions in a while loop |
| tall4.c | Temperature conversions with ++ and += |
| tall6.c | Temperature conversions in a while loop |
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
The if statement.
Writing conditions in C.
Exercise.
if, else, elseif.
switch, case, default.
while.
++ and += operator families.
Exercise.
do while.
for.
break and continue.
goto and labels.
Layout of your blocks, and comments revisited.
Exercise.
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.