Enrolment options

RTB e-learning banner

gencp401.c
#include <stdio.h>

int main(void) {
    printf("GENCP401: Apply C Programming\n");
    return 0;
}
$ gcc gencp401.c -o gencp401 && ./gencp401
GENCP401: Apply C Programming
GENCP401 Level 4 CSA

Apply C programming

Learn to think like a programmer: design a solution, write it in C, then test it until it works. Three learning outcomes take you from first idea to a program you can trust.

Understand
Apply computer programming languages
Build
Write C programming codes
Verify
Perform program testing

Learning outcomes

Select an outcome to see what you will learn and do.

Learning outcome 1: Apply computer programming languages

You learn how programs are planned and how a language turns your instructions into something a computer can run.

  • What a program is, and how programming languages are classified
  • Low-level, high-level, compiled and interpreted languages
  • Planning a solution with algorithms, pseudocode and flowcharts
  • Setting up a C environment: compiler, editor or IDE
  • Compiling and running your first C program
You will be able to choose a suitable language for a task and prepare a working C environment.
Learning outcome 2: Write C programming codes

This is the core of the module. You write C programs that read input, make decisions, repeat tasks and organise data.

Program structure Variables and data types Input and output Operators if / else / switch for / while / do-while Functions Arrays and strings Pointers Structures File handling
/* Example: decide with a condition, repeat with a loop */
int marks = 72;
if (marks >= 50) printf("Competent\n");

for (int i = 1; i <= 3; i++)
    printf("Attempt %d\n", i);
You will be able to write, organise and run C programs that solve everyday problems.
Learning outcome 3: Perform program testing

Working code is not enough. You learn to find mistakes, fix them and prove that your program behaves as expected.

  • Syntax, runtime and logic errors, and how to recognise each
  • Reading compiler messages and warnings
  • Debugging by tracing, print statements and a debugger
  • Designing test cases with expected and actual results
  • Testing with normal, boundary and invalid inputs
  • Documenting test results and improving the code
You will be able to test a program, fix its errors and report the results clearly.

How you will learn

Code in the lab
Practise every concept on a computer with a C compiler.
Solve small problems
Turn short real-life tasks into working programs.
Test and improve
Check your own work, debug it and make it better.
By the end of this module, can you:
Explain how a C program goes from source code to a running program?

Yes, once you finish learning outcome 1: write, compile, link, run.

Write a C program that uses decisions, loops and functions?

Yes, once you finish learning outcome 2.

Find and fix errors, and prove your program works with test cases?

Yes, once you finish learning outcome 3.

Self enrolment (Non-editing teacher)