View on GitHub

Scientific-C

Material for a training on C as a language for scientific programming

C is widely used in many contexts. This training focusses on using C for scientific programming.

Learning outcomes

When you complete this training you will be able to

Schedule

Total duration: 8 hours, split over two sessions.

Session one

Total duration: 8 hours

Subject Duration
introduction and motivation 5 min.
basics: control flow statements, data types 85 min.
hands-on session 20 min.
coffee break 10 min.
functions 15 min.
simple I/O 10 min.
arrays and user defined types 85 min.
hands-on session 20 min.

Session two

Total duration: 4 hours

Subject Duration
pointers & dynamic memory management 80 min.
hands-on session 20 min.
error handling 10 min.
coffee break 10 min.
using third-party libraries 80 min.
hands-on session 20 min.
wrap up 10 min.

Training materials

Slides are available in the GitHub repository, as well as example code and hands-on material.

Target audience

This training is for you if you need to use C as a programming language.

Prerequisites

You will need experience programming in another programming language, This is not a training that starts from scratch.

If you plan to do C programming in a Linux or HPC environment you should be familiar with these as well.

Quick self-assessment

The tasks below are not meant to test prior C knowledge. They describe programming concepts you should already recognize from another programming language. If you can do most of them in any language, you are likely ready for this training.

If several of these items still feel difficult, the training will probably move too fast. In that case, it is better to first take a short introductory programming course.

Software and access requirements

To follow hands-on, you need a computer with a C development environment installed. You can of course use an HPC system you have access to as well.

Level

Trainer(s)