← codetypingtest

C++ typing test

C++ builds templates, namespaces and smart pointers on top of C, and each brings its own symbols. Every program here uses std::, output goes through <<, and the Expert programs use types like std::unique_ptr<Node>. It's one of the most symbol-heavy languages in the test.

Start the C++ typing test

What you'll type in C++

Example: FizzBuzz in C++

Every output line chains std::cout << with a string. Watch the last else, which needs two << to print the number and then a line break.

#include <iostream>

int main() {
    for (int i = 1; i <= 15; i++) {
        if (i % 15 == 0) std::cout << "FizzBuzz\n";
        else if (i % 3 == 0) std::cout << "Fizz\n";
        else if (i % 5 == 0) std::cout << "Buzz\n";
        else std::cout << i << "\n";
    }
}

Type this program now

Tips for typing C++ faster

All 20 C++ programs

Every program is real, working C++. Choose one to start typing it straight away.

Beginner

Intermediate

Advanced

Expert

How the test works

The timer starts on your first key and stops once every character is right. Press Enter for a new line and the indentation is filled in for you. A wrong key shows in red and counts as a mistake; press Backspace to go back and fix it. Your best time for each program is saved in your browser. Read more about how speed and accuracy are calculated, or get tips for typing code faster.

Other languages