Skip to content
IT glossary
BackendUpdated December 3, 2026

C

C is a programming language used for operating systems, firmware, and server software. C code is usually compiled to machine instructions, and programmers can use pointers to access data through its address in memory.

Also known as: язык C, си

What makes C different?

C is a general-purpose language with static types. Programs are usually organized around functions, and a struct groups related fields into one value. C gives you direct control over many decisions about memory: you can pass an object's address to a function instead of copying the object, and you can decide when dynamically allocated storage is released. That control comes with a responsibility to track which objects are still alive and how much memory is available through each pointer.

From source file to program

A typical build starts with the preprocessor handling directives such as #include. Headers let several source files share declarations, such as a function's name, parameter types, and return type. The compiler generally produces an object file for each preprocessed source file. The linker then connects calls to implementations in other object files or libraries. A call can compile successfully because the declaration is visible and still fail to link because the implementation is missing from the build.

Example: changing a caller's variable

#include <stdio.h>

static void increment(int *value) {
    *value += 1;
}

int main(void) {
    int count = 41;
    increment(&count);
    printf("%d\n", count);
    return 0;
}

&count gives the function the address of count. The parameter value holds a copy of that address: C passes all arguments by value, including pointers. Writing to *value changes the object at that address, so the program prints 42. Reassigning value itself would only change the local copy of the pointer.

Memory and common mistakes

The local variable count has automatic storage duration: it stops existing when execution leaves its block. Storage obtained from a successful malloc call, by contrast, is not released just because a local pointer goes out of scope. The code needs to check whether allocation succeeded and call free when the storage is no longer needed. C has no built-in garbage collector. Reading past the end of an array or accessing an object after it has been freed is undefined behavior. A run that appears to work does not make the code valid.

Where C fits in backend work

PostgreSQL, Redis, and Nginx are examples of software written largely in C. You can also encounter it below the application layer: a service written in another language may call a C library through a binding. Outside backend work, C is common in operating system kernels, device drivers, and microcontroller firmware.

How it comes up in interviews

A common question is why sizeof items gives different answers for a local array and a function parameter declared as int items[]. For the local array, it gives the total size of the array in bytes. In a parameter declaration, int items[] is adjusted to int *items, so sizeof items gives the size of a pointer. That's why functions that process arrays often take the element count as a separate argument.