Beginner to Pro · 23 lessons · Free

C Programming: Zero to Hero

Bite-sized lessons of 5–10 minutes. Run the examples, crush the challenge, stack up XP: one lesson at a time, from beginner to pro.

C progress0/23 lessons
Start learning, it's free
What is C? Read the beginner's guide →Want to write your own code? Open the C compiler →
  1. MODULE 1

    C Basics

    printf, variables, format specifiers, scanf and operators

    1. 1. Your First C Program#include, main() and printf()
    2. 2. Variables and Format Specifiersint, float, double, char and %d %f %c
    3. 3. Reading Input with scanf()&, %d, %lf, %c and %s
    4. 4. Operators and Type Casting+ - * / %, ++, -- and integer division
  2. MODULE 2

    Making Decisions: Conditions

    if, else if, &&, ||, the ternary operator and switch

    1. 1. if, else and else ifComparisons and decisions
    2. 2. &&, ||, ! and switchCombine conditions and use switch-case
  3. MODULE 3

    Loops

    for, while, do-while, break, continue, primes and patterns

    1. 1. The for LoopRepeat work a set number of times
    2. 2. while and do-whileWork with digits: reverse and sum
    3. 3. break, continue and Prime NumbersStop a loop early or skip a round
    4. 4. Nested Loops: PatternsStar and number patterns
  4. MODULE 4

    Arrays

    Arrays, searching, bubble sort and matrices

    1. 1. ArraysCreate arrays, use indexes and fill them from input
    2. 2. Searching and Bubble SortLinear search, binary search and bubble sort
    3. 3. 2D Arrays: MatricesMatrix addition, transpose and multiplication
  5. MODULE 5

    Functions and Strings

    Functions, recursion, char arrays, string.h and string problems

    1. 1. FunctionsWrite functions with parameters, return values and prototypes
    2. 2. RecursionBase case, factorial and Fibonacci
    3. 3. Strings: Character Arrays'\0', strlen, strcpy, strcmp and fgets
    4. 4. String Problems: Reverse, Palindrome, FrequencyString algorithms without library help
  6. MODULE 6

    Pointers and Memory

    Pointers, call by reference, pointer arithmetic and malloc/free

    1. 1. Pointers: Working with Addresses&, *, NULL and pointer basics
    2. 2. Call by Reference: SwapPass pointers so a function can change your variables
    3. 3. Pointers and ArraysPointer arithmetic, *(p + i) and strings
    4. 4. Dynamic Memory: malloc and freeAsk for memory at run time and give it back
  7. MODULE 7

    Structures and a Project

    struct, typedef, -> and a bank-account mini project

    1. 1. Structures (struct)Group related data: struct, typedef and ->
    2. 2. Mini Project: Bank Account SystemStructs, functions, pointers and switch together