We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Orientation and the Gate
C++Get started with C++ exercises. Learn how compilation, tests and clang-tidy checks work, and use their feedback to revise your code.
This track uses C++. You can make it your practice mode to browse related content across the site.
3 exercises
Explore freely. Sign in to keep your progress.
Your learning sequence
- 1 Not solved yet. Your first C++ lint check Practice · Easy
- 2 Not solved yet. Read a compiler diagnostic Practice · Easy
- 3 Not solved yet. What gets compiled with your code Practice · Easy
Check yourself
4 questions · not saved while you're signed outUse these questions to check your understanding and compare explanations. Your score does not affect track completion.
What does this C++20 program print?
Choose one answer to reveal the explanations. Answers are kept only while this page is open.
#include <iostream>
int main() {
std::cout << 7 / 2 << std::endl;
std::cout << 7 / 2.0 << std::endl;
std::cout << 7 % 2 << std::endl;
}