C — Command Reference
C's most used commands — the foundation of systems and many languages. Each example is a complete program (#include <stdio.h> + main). Each includes an explanation and a working example.
8 categories · 21 commands
🖥️
Output & Input
Formatted printing with printf and reading with scanf.
printf()Format specifiers (%d %f %c %s)scanf()📦
Variables
Typed variables and constants.
Typed variableconst / #define🔢
Numbers & Math
Arithmetic and math.h.
Arithmetic ( + - * / % )math.h (sqrt / pow)✍️
String
Character arrays and string.h functions.
char array (text)strlen()strcpy() / strcat()strcmp()📋
Array
Fixed-size arrays.
ArrayTraversing an array (for)🔁
Condition & Loop
Decision making and repetition.
if / elseswitchforwhile🧩
Function
Function definition and usage.
Functionvoid (no return value)👉
Pointer
Working with memory addresses — the heart of C.
Pointer ( * and & )Passing a pointer to a function