Skip to main content Skip to navigation

Session 2 - Writing and compiling code

Session Objectives:

By the end of this session you should be able to:
  1. write very simple code in either C or fortran 90
  2. be able to compile and run this code
  3. link in external libraries to your code at compile time
  4. understand the source and build executables from other people's code

This section is intended as a quickstart guide only. You are strongly advised to read and practice further once this Section is completed.

Links to tutorials in two common programming languages are shown at the top. Choose ONE language that you'd like to learn/refresh - at least to start with. You can always come back and find out more later. You will only be tested on ONE language.

ALL of you should read the section on compiler options (for linking libraries and including header files).

Session Assessment:

This part of the module is assessed by an online test. There are two tests available for this Session, either:

  1. A practice test called Walsh CY900 S2c MOCK TEST
  2. The REAL test called Walsh CY900 S2c REAL TEST


  1. A practice test called Walsh CY900 S2f MOCK TEST
  2. The REAL test called Walsh CY900 S2f REAL TEST

depending on whether you elected to study fortran90 or C. You should sit tests for ONE of these languages only.

You can take the mock test 3 times. Also, you have at most 3 attempts to pass the real test.

The pass rate is 70%.

To take the test, follow the link below, and then log in with your IT userid and password.

You should try to pass this test ASAP, but the deadline for completion of ALL tests is Friday of week 0.

Online tests - Perception