Learn C
C is a general-purpose programming language that has been widely used for over 50 years.
C is very powerful; it has been used to develop operating systems, databases, applications, etc.
Examples in Each Chapter
an online editor makes it easy to learn C. You can edit code and view the result in your browser:
Example
java
#include <stdio.h>
int main() {
printf("Hello World!");
return 0;
}
C Exercises
Many chapters in this tutorial end with an exercise where you can check your level of knowledge.
What You'll Learn
This tutorial will guide you step by step, with examples and exercises along the way:
- How C programs are structured
- Variables, data types, and operators
- If statements, loops, and arrays
- Functions and how to reuse code
- Pointers and memory
- Structures to organize related data
- Reading from and writing to files
- Organizing programs and build real-life projects
C Quiz Check your understanding with a short quiz and see how well you know the basics of C. Start C Quiz
Learn by Examples Learn by examples! This tutorial supplements all explanations with clarifying examples. See All C Examples
C Reference
You will also find complete keyword and function references:
Reference Overview C Keywords C stdio Functions C stdlib Functions C string Functions C math Functions C ctype Functions C time Functions