Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Courses / Programming

        C programming and C++ practice

        C programming training with a real compiler in your browser. Each lesson has worked examples, then practice problems that compile your code and test it, from your first function to pointers, memory and C++ classes. Two projects and three interview sets come at the end.

        Start lesson 1Practice the first unit of every course. No account needed.
        81lessons
        374checked exercises
        8projects, cases and exams
        Prepares you for C and C++ developer, systems and low-latency engineering interviews

        What you will be able to do

        • Write C functions with the right types, and avoid integer division and overflow surprises
        • Loop over arrays and strings with their lengths and terminating zeros, without reading past the end
        • Read input with scanf and print formatted output with printf in a complete program
        • Use pointers for out-parameters, half-open ranges and safe NULL checks
        • Compare, search and format strings with strcmp, strchr, strtol and snprintf
        • Manage heap memory with malloc, realloc and free, and build a growable array, a linked list and a trade ledger
        • Move to C++ with std::string, std::vector, references, overloads and exceptions
        • Write classes that guard their own rules, with const member functions and operators, and build a limit order book
        • Use the standard library on real data: algorithms and lambdas, maps and sets with your own hash, optional, variant and string_view
        • Own resources with RAII, unique_ptr and shared_ptr, and move instead of copying, checked by tests that count copies and open handles
        • Write function and class templates, constrain them with concepts, and compute tables at compile time with constexpr
        • Reason about data races, atomic operations and memory orders the way latency-sensitive teams do
        • Run real std::thread code with mutexes, condition variables, futures and a worker pool, in a simulator that exposes races and reports deadlocks
        • Lay data out for the cache, keep allocation off the hot path, measure latency with percentiles and keep prices exact in fixed point
        • Build the structures latency-sensitive systems rely on: ring buffers, a lock-free single-producer queue, a price ladder book and a flat hash map
        • Prepare for C and C++ coding interviews with question sets from easy to hard and a 45-minute timed practice set
        • Read a compile error, a failed test and an undefined behavior report, and find the line that caused it

        Who it is for

        You're learning C or C++ for a systems, embedded or trading-systems role
        The exercises use the habits those teams look for: integer prices in cents, checked boundaries and code that never reads past a buffer.
        You know another language and want to understand memory
        Pointers, arrays and strings are taught one idea at a time, and every mistake is reported at its line instead of failing silently.
        You have a C or C++ coding test coming up
        Every exercise has hidden tests with the edge cases interviewers try: empty input, ties, the last element and values that overflow.

        What you can practice free

        Unit 1, First C functions: 6 lessons and 28 checked exercises, with no account or card.

        Start the free unit

        The rest of the course opens with a One Course or All Access plan. See plans and prices

        Keep going in C and C++

        Choose access here. Your course is already selected.

        One Course

        Every lesson, project and mock exam in C and C++.

        Loading price/ month

        Billed monthly. Cancel any time.

        All Access

        Every course, exam and project, plus the Interview Hub.

        Loading price/ month

        Billed monthly. Cancel any time.

        Projects, case studies and mock exams

        Learn C and C++ by writing code that a real compiler builds in your browser and tests check the moment you run it. Start in C with functions, arrays, strings, pointers and memory you manage yourself. Then move to C++: references, classes, the standard library, RAII and smart pointers, templates, then threads, locks, condition variables, atomics and the C++ memory model, run in a simulator that shows races and deadlocks.

        The later levels turn to performance: data laid out for the cache, code that does not allocate on the hot path, and the patterns used in latency-sensitive systems such as trading engines. Interview questions and a timed practice set close the course.

        Interview practice

        Explain what you've learned in a full-screen interview. Speak or type, then review your answers against the rubric for your level.

        Interview loops by job

        Beginner

        FreeNo account or card needed. Every lesson in this unit is yours to practice.

        First C functions

        Functions, types, arithmetic, conditions, loops and a first whole program.

        6 lessons

        Arrays and strings

        Arrays with their length, searching, strings that end in a zero byte and the string.h functions.

        5 lessons

        Pointers

        Addresses and out-parameters, pointer arithmetic over arrays, NULL and const.

        4 lessons

        Memory and structs

        Structs and ->, heap memory with malloc and free, growable arrays and linked lists.

        6 lessons

        Intermediate

        From C to C++

        std::string and std::vector, references, the string and vector toolkits with exceptions, overloads and defaults.

        5 lessons

        Classes

        Classes with invariants, const member functions, operators, and an order book built step by step.

        5 lessons

        The standard library

        Algorithms and lambdas, iterators, maps, sets and hashing, optional and variant, and string_view parsing.

        8 lessons

        RAII and smart pointers

        Destructors and RAII, unique_ptr, shared_ptr and weak_ptr, move semantics and the rule of zero, three and five.

        6 lessons

        Advanced

        Templates

        Function and class templates, non-type parameters, concepts, constexpr and compile-time tables.

        5 lessons

        Atomics and the memory model

        Data races, atomic operations and memory orders, reasoned through on one thread before the next unit runs real threads.

        4 lessons

        Running threads

        Threads, mutexes, lock guards, deadlock, condition variables, atomics, futures, a thread-safe queue and a worker pool, run in a simulator that switches threads under 12 schedules and reports races and deadlocks.

        11 lessons

        Expert

        Performance: memory, allocation and measurement

        Cache-friendly layout, no allocation on the hot path, pools and arenas, less work per message, measuring latency and fixed-point prices.

        7 lessons

        Low-latency patterns

        Ring buffers, a lock-free single-producer, single-consumer queue, an order book on a price ladder and a flat hash map, none of which allocate after start-up.

        4 lessons

        Interviews and timed practice

        C and C++ interview questions from easy to hard, a concurrency set, and a 45-minute timed coding screen.

        5 lessons

        Coming next

        Low-latency patterns

        Project: a market data handler

        Common questions

        Do I need to install a compiler?

        No. Your code compiles with Clang inside your browser and runs there as WebAssembly. The first run downloads the compiler, about 22 MB, and your browser keeps it for later visits.

        Is it free?

        The first unit is free and needs no account. The rest of the course opens with a One Course or All Access plan, and the pricing page shows every plan and its price.

        How is my code checked?

        Tests call your functions, or feed your program input, and compare the result with the right answer. Hidden tests try other values and the edge cases. Undefined behavior such as signed overflow or a null pointer stops the program and names the line, which a normal build would not do.

        Is it C or C++?

        Both. The course starts in C, where you see memory directly, and moves to C++ for classes, the standard library, RAII, templates and performance work. The course outline shows which units are open now and which are coming. Threads run in a simulator in the browser: one real thread switches between your threads under many schedules, so races and deadlocks show up and are reported, though there is no real parallel speed-up.

        How long does the course take?

        About 35 hours for the lessons built so far. A lesson takes about 15 minutes, and a practice set about 30.

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        or

        You can keep practicing without an account.

        Change your plan

        Checking the price

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.