Introduction
C is a general-purpose, compiled programming language created in 1972 by Dennis Ritchie at Bell Labs. It gives you very close control over memory and hardware, which is why operating systems (including parts of Linux and Windows), embedded devices, and high-performance software are still written in C today.
Because C is small and close to the machine, learning it teaches you how computers actually work under the hood — memory, pointers, and manual resource management — concepts that make every other language easier to understand.
Syntax
#include <stdio.h>
int main() {
// your code here
return 0;
}Example
Every C program needs a main() function — it's where execution starts. #include <stdio.h> brings in the standard input/output library so you can use printf.
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}Try it yourself
Copy this example into the C compiler and run it — try changing a value and see what happens.
