C Programming exercises with solutions
57 practice problems from the 18 lessons of the Structured Programming in C course, in lesson order and from easy to hard inside each lesson. Open a problem, write your code and press Submit: the tests run in your browser and nothing is sent to a server.
21 easy problems 18 medium problems 18 hard problems
Your first C program
3 problems · Read the lesson
Variables and types
3 problems · Read the lesson
Operators and expressions
3 problems · Read the lesson
Input and output: printf and scanf
3 problems · Read the lesson
Decisions: if, else and switch
4 problems · Read the lesson
Loops: for, while and do-while
4 problems · Read the lesson
Arrays
4 problems · Read the lesson
Strings are char arrays
3 problems · Read the lesson
Functions
3 problems · Read the lesson
Recursion and the call stack
3 problems · Read the lesson
Pointers
3 problems · Read the lesson
Pointers and arrays
3 problems · Read the lesson
Structures
3 problems · Read the lesson
Constants, enums and macros
3 problems · Read the lesson
Dynamic memory: malloc and free
3 problems · Read the lesson
Linked lists
3 problems · Read the lesson
Reading and writing files
3 problems · Read the lesson
Bugs C will not catch
3 problems · Read the lesson