C++ bootcamp

Question on the left. Your C++ on the right. Check it.

Each lab is one problem: read the spec, write a solution, press Run, then Check. Hints stay closed. The correct code is there when you need it. g++ grades stdout against hidden tests.

50 labs · 26 easy · 24 medium · progress stays in this browser.

  1. Read the questionInput, output, and a short example. Same shape as a classroom worksheet.
  2. Write C++, then RunThe starter is a skeleton. Change it, then see what happens.
  3. Check, or open a hintCheck runs every test. Hint and correct code stay folded until you open them.

Labs

Work them in order, or jump ahead when you are ready.

  1. 01easy

    Hello, C++

    Output · 5 min

    Open lab
  2. 02easy

    Sum two numbers

    Input · 8 min

    Open lab
  3. 03easy

    Celsius to Fahrenheit

    Math · 8 min

    Open lab
  4. 04easy

    Even or odd

    If Else · 8 min

    Open lab
  5. 05easy

    Letter grade

    If Else · 10 min

    Open lab
  6. 06easy

    Largest of three

    If Else · 10 min

    Open lab
  7. 07easy

    Times table

    For Loop · 10 min

    Open lab
  8. 08easy

    Squares on one line

    For Loop · 10 min

    Open lab
  9. 09easy

    Sum 1 to n

    While Loop · 10 min

    Open lab
  10. 10medium

    FizzBuzz

    For Loop · 12 min

    Open lab
  11. 11medium

    Fibonacci sequence

    For Loop · 12 min

    Open lab
  12. 12medium

    Count the words

    Strings · 10 min

    Open lab
  13. 13easy

    Count the vowels

    Strings · 10 min

    Open lab
  14. 14easy

    Reverse a word

    Strings · 10 min

    Open lab
  15. 15medium

    Palindrome check

    Strings · 12 min

    Open lab
  16. 16medium

    Maximum in a vector

    Vectors · 12 min

    Open lab
  17. 17medium

    Average of a vector

    Vectors · 12 min

    Open lab
  18. 18medium

    Second largest

    Sets · 12 min

    Open lab
  19. 19medium

    Unique and sorted

    Sets · 10 min

    Open lab
  20. 20medium

    Word frequency

    Maps · 15 min

    Open lab
  21. 21medium

    Factorial function

    Functions · 12 min

    Open lab
  22. 22easy

    Leap year

    If Else · 10 min

    Open lab
  23. 23easy

    Sum of digits

    While Loop · 10 min

    Open lab
  24. 24easy

    Countdown

    For Loop · 8 min

    Open lab
  25. 25easy

    Skip multiples of 3

    Break Continue · 10 min

    Open lab
  26. 26medium

    Prime check

    Functions · 12 min

    Open lab
  27. 27medium

    Greatest common divisor

    Functions · 12 min

    Open lab
  28. 28easy

    Star triangle

    Nested Loops · 10 min

    Open lab
  29. 29medium

    Anagram check

    Strings · 12 min

    Open lab
  30. 30medium

    Safe division

    Exceptions · 12 min

    Open lab
  31. 31medium

    Rectangle class

    Classes · 15 min

    Open lab
  32. 32medium

    Swap with references

    References · 12 min

    Open lab
  33. 33medium

    Power by recursion

    Recursion · 12 min

    Open lab
  34. 34medium

    Keep the evens

    Lambdas · 12 min

    Open lab
  35. 35medium

    Sort descending

    Algorithms · 10 min

    Open lab
  36. 36medium

    Matrix sum

    2D Arrays · 12 min

    Open lab
  37. 37medium

    Linear search

    Vectors · 12 min

    Open lab
  38. 38easy

    Reverse a vector

    Vectors · 8 min

    Open lab
  39. 39medium

    Collatz steps

    While Loop · 12 min

    Open lab
  40. 40easy

    Min with a ternary

    Ternary · 8 min

    Open lab
  41. 41medium

    Map lookup

    Maps · 12 min

    Open lab
  42. 42easy

    Day of the week

    Switch · 10 min

    Open lab
  43. 43easy

    Count the digits

    Strings · 8 min

    Open lab
  44. 44easy

    Filter even values

    Vectors · 10 min

    Open lab
  45. 45easy

    Min and max

    Vectors · 8 min

    Open lab
  46. 46easy

    Days in a month

    Switch · 10 min

    Open lab
  47. 47easy

    Absolute difference

    Math · 8 min

    Open lab
  48. 48easy

    Median of three

    If Else · 10 min

    Open lab
  49. 49easy

    Title case

    Strings · 12 min

    Open lab
  50. 50medium

    Power of two?

    Bitwise · 10 min

    Open lab

FAQ: C++ Bootcamp Labs

Common questions about this page.

What is the StudyGrid C++ tutorial?

The StudyGrid C++ tutorial is a full beginner-to-advanced track: syntax, types, input, loops, functions, classes, the STL, templates, maps, and lambdas. Each chapter has copy-and-run examples.

Should I run c++ bootcamp labs examples locally for better learning?

Yes. Use the browser editor on StudyGrid for a quick check, then Download the example and run it on your computer. Local runs show real errors and the real toolchain, which is one of the fastest ways to learn c++ bootcamp labs in this C++ Labs C++ lesson (C++ Bootcamp Labs).

Is the C++ editor the same as Try Python or Try HTML?

No. Try C++ compiles with g++ at /cpp/try and shows stdout plus compiler messages. Try Python stays at /try. Try HTML stays at /html/try. C++ lessons never open those editors.

Do I need to install a compiler to learn C++?

No. Open a chapter, click Try it in C++, and compile in the browser. You can also download a .cpp file and compile locally with g++.

Where should I start the C++ tutorial?

Start at C++ Intro, then Get Started and Syntax. After the first program, continue to output, variables, and if-else. After classes, open C++ Examples, then templates, map, and lambdas. Use Next at the bottom of each chapter.

Is the C++ tutorial free?

Yes. The C++ workshop on StudyGrid (studygrid.in) is free: dashboard, chapters, and the compile-and-run editor.