Skip to content
UPEEC

C

The language of embedded systems and operating systems — small, fast and close to the hardware.

Easy
Comments 0

C gives you direct control over memory and hardware with very little runtime overhead, which is why it powers microcontroller firmware, operating-system kernels and device drivers.

The price of that power is responsibility: no automatic memory management, no bounds checking, and undefined behaviour if you get things wrong.

Sub-topics (11)

Structure of a C Program

Headers, the main function, statements and return codes — the anatomy of a C program.

Beginner♥ 0🔖 0💬 0

C Compilation Process

Source code goes through preprocessing, compilation, assembly and linking to become an executable.

Easy♥ 0🔖 0💬 0

Operators in C

Arithmetic, relational, logical, bitwise, assignment and the ternary operator.

Beginner♥ 0🔖 0💬 0

Functions in C

Declaring, defining and calling functions in C; prototypes and header files.

Easy♥ 0🔖 0💬 0

Arrays and Strings in C

Fixed-size blocks of elements, and strings as char arrays ending in '\0'.

Easy♥ 0🔖 0💬 0

Pointers

A pointer stores a memory address — the key to arrays, dynamic memory and hardware registers in C.

Intermediate♥ 0🔖 0💬 0

Dynamic Memory Allocation

Request memory at run time with malloc/calloc/realloc and give it back with free.

Intermediate♥ 0🔖 0💬 0

Structures and Unions

struct groups related fields; union lets several fields share the same memory.

Easy♥ 0🔖 0💬 0

The C Preprocessor

#include, #define macros and conditional compilation run before the compiler sees your code.

Easy♥ 0🔖 0💬 0

volatile and const in Embedded C

volatile tells the compiler a value can change outside the program's control; const promises it won't be modified.

Intermediate♥ 0🔖 0💬 0

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.