Hello World
Concept: A simple introduction to program structure and printf().
Viva: Why is stdio.h included?
#include <stdio.h>
int main(void) {
printf("Hello World");
return 0;
}For Diploma & Certificate ICT Students | KNEC / TVET
By Clinton Wafula Luswa, ICT Tutor
I'm an ICT tutor who teaches C programming to Diploma and Certificate ICT students. I hold a Diploma in ICT from Eldoret National Polytechnic and I am training in pedagogy at KSTVET (2026). I have 3 years of experience teaching in a cyber, where I help students go from their first line of code to writing programs on their own.
My method is simple: Learn by Building. You don't just read about loops, you use them in a real program. In 8 weeks we go from Hello World to a working mini project you can show to lecturers and employers.
Looking for a C programming trainer for your Diploma or Certificate ICT department? Here is what I bring to the classroom.
One topic a week, always ending with something you build yourself. Tap a week to open the free notes.
Set up a C compiler on your computer and run your first Hello World program.
Watch the video → Week 2Variables, data types, input and output, and operators.
Open notes → Week 3Make your programs take decisions with if, else and switch.
Open notes → Week 4Repeat work with for, while and do-while loops.
Open notes → Week 5Break big programs into reusable parts with parameters and return values.
Open notes → Week 6Store lists of values and work with text in C.
Open notes → Week 7Understand memory addresses and save data to files.
Open notes → Week 8Put everything together in a finished project for your portfolio.
See projects →Every lesson is hands-on. You type the code, run it, break it and fix it.
Notes, practical questions and viva questions made for Diploma and Certificate ICT students.
You finish with the mini project, something real to show lecturers and employers.
Small groups mean every student gets attention and questions get answered.
KNEC-friendly C programming notes, one page per topic. Read on your phone, practise in the online compiler.
Variables, data types, input/output, operators, comments and program structure.
Decision making and repetition with if, else, switch, for, while and do-while.
One-dimensional and two-dimensional arrays, searching and sorting.
Character arrays, string input, string length and common string functions.
Reusable functions, parameters, return values, scope and recursion.
Memory addresses, dereferencing, pointers with arrays and functions.
Custom record types for student, payroll, library and other data.
Read and write persistent data using C file streams.
Write, compile and run C programs in your browser, no install needed.
Start with small programs and progress to arrays, strings and structures. Copy, run, then change them.
Try:
Try another keyword such as loop, array or function.
Concept: A simple introduction to program structure and printf().
Viva: Why is stdio.h included?
#include <stdio.h>
int main(void) {
printf("Hello World");
return 0;
}Concept: Variables, input and arithmetic.
Practice: Modify it to calculate average.
#include <stdio.h>
int main(void) {
int a, b;
printf("Enter two numbers: ");
scanf("%d %d", &a, &b);
printf("Sum = %d", a + b);
return 0;
}Logic: n % 2 == 0 identifies an even integer.
Topic: Selection control structure.
#include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
if (n % 2 == 0) printf("Even");
else printf("Odd");
return 0;
}Concept: Multiple conditions using if...else if...else.
#include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
if (n > 0) printf("Positive");
else if (n < 0) printf("Negative");
else printf("Zero");
return 0;
}Logic: Test possible divisors and track whether any divides the number.
Practice: Rewrite it using a function.
#include <stdio.h>
int main(void) {
int n, prime = 1;
scanf("%d", &n);
if (n < 2) prime = 0;
for (int i = 2; i * i <= n; i++)
if (n % i == 0) { prime = 0; break; }
printf(prime ? "Prime" : "Not prime");
return 0;
}Concept: Repetition and accumulation.
#include <stdio.h>
int main(void) {
int n;
unsigned long long f = 1;
scanf("%d", &n);
for (int i = 1; i <= n; i++) f *= i;
printf("%llu", f);
return 0;
}Concept: Traverse an array and keep the current maximum.
#include <stdio.h>
int main(void) {
int a[5], max;
for (int i = 0; i < 5; i++) scanf("%d", &a[i]);
max = a[0];
for (int i = 1; i < 5; i++)
if (a[i] > max) max = a[i];
printf("Largest = %d", max);
return 0;
}Concept: Character arrays and the standard strlen() function.
Safety: Use bounded input such as fgets() for lines.
#include <stdio.h>
#include <string.h>
int main(void) {
char s[100];
fgets(s, sizeof s, stdin);
printf("Length = %zu", strlen(s));
return 0;
}Concept: A function can accept a parameter and return a calculated value.
#include <stdio.h>
float area(float r) {
return 3.14159f * r * r;
}
int main(void) {
float r;
scanf("%f", &r);
printf("%.2f", area(r));
return 0;
}Concept: A structure groups related fields under one type.
#include <stdio.h>
struct Student {
char name[50];
int age;
float marks;
};
int main(void) {
struct Student s = {"Alex", 20, 78.5f};
printf("%s %d %.1f", s.name, s.age, s.marks);
return 0;
}Revise the way you will be tested: write the program, then explain it.
Programming questions to solve on the computer, from simple input/output to arrays, functions and files.
Practise NowQuestions examiners ask when they want you to explain your code and your logic.
Revise Viva QuestionsStudent management, library, ATM and payroll systems to practise a full program.
See ProjectsFollow along step by step. New lessons are added as the course grows.
Coming soon
Coming soon
Coming soon
Choose the format that fits you. Message me on WhatsApp and I'll send the details.
For students who want structure alongside college or work.
For colleges and TVET institutions that need a C programming trainer.
Personal lessons at your own pace, ideal for catching up or exam revision.
Yes. C gives beginners practice with variables, expressions, control flow, functions, arrays and memory concepts. Start with small programs and increase difficulty gradually.
Read a concept, type an example yourself, compile it, test different inputs, explain the logic aloud and solve a related problem without copying.
Move to control structures, arrays and strings, then functions, pointers, structures and file handling. Projects help connect the topics.
You can begin with a browser-based compiler or mobile coding environment, but a computer becomes more convenient for larger multi-file projects.
Use the C practical questions and C viva questions pages on this site.
I am open to ICT trainer and C programming tutor positions in Nairobi and Eldoret. Colleges, TVET institutions, students and parents are all welcome to message me and I will reply as soon as I can.