Guide · C Programming Language

C Programming Language – Learning Guide

C is one of the oldest and most influential programming languages. It is widely used for operating systems, microcontrollers, and applications where execution speed and efficient use of resources are important. Its compact syntax also makes it a popular first language in schools and introductory programming courses.

This guide follows a recommended learning path: from your first C program and basic data types to control flow, functions, arrays, pointers, structures, and file handling. It also includes links to practice tasks and solutions written in C.

  • Primary and secondary school
  • Beginner level
  • Examples in C
Learning tip: type each example yourself, compile it, run it, and then change it. You can write C programs in Code::Blocks, Dev-C++, or Visual Studio Code with a GCC compiler.

Some lessons and practice materials linked below are currently available only in Serbian. They are marked (Serbian) so you can identify them before opening the page.

1 C language fundamentals

Learn how a C program is organised, how variables and data types work, and how to use operators in expressions.

2 Selection statements and loops

Learn how a program makes decisions, repeats instructions, and uses one loop inside another.

3 Functions

Divide a program into smaller, reusable parts. Learn how to define and call functions, pass arguments, and return values.

4 Arrays, matrices, and strings

Work with collections of values of the same type, two-dimensional data, and text represented as character arrays.

5 Pointers, structures, and files

Explore topics that give you more control over memory and data organisation in C.

6 C practice tasks and solutions

Use these tasks to practise what you have learned. Try to solve each problem on your own before opening its solution.

✎ A short C example

This program reads two integers and prints their sum.

#include <stdio.h>

int main(void) {
    int a, b;

    /* Read two integers */
    printf("Enter two numbers: ");
    scanf("%d %d", &a, &b);

    /* Print their sum */
    printf("The sum is: %d\n", a + b);
    return 0;
}