- Executors
-
Learn
Learn Python Runnable examples, NumPy, pandas, and more Learn AI / Machine LearningNeural networks, ML and LLMs from scratch Learn C & C++ Pointers, memory, STL, and modern C++ Learn C#C# basics, OOP, LINQ, async, and .NET exercises Learn MatplotlibLine, bar, scatter and pie charts with live visualizers Learn RustOwnership, traits, error handling, and threads Learn GoSlices, interfaces, goroutines, and channels Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++ Coding for Kids Learn to code by playing!
- ChallengesNew
- For TeachersNew
- Updates
- Buy me a coffee
C/C++ fundamentals
From your first program to operators, conditions, loops, strings, arrays, functions and structs, with a challenge after each topic.
1 Getting started 4 lessons
- Lesson 1 challenge Hello World and Program Structure Compare the smallest complete C and C++ programs.
- Lesson 2 challenges Data Types and Formatted Output Declare integer and floating-point values and print them safely.
- Lesson 2 challenges Operators and Expressions Use arithmetic, assignment, comparison and logical operators in C and C++.
- Lesson 2 challenges Reading and Validating Input Read user input and reject invalid values.
2 Making decisions 2 lessons
- Lesson 3 challenges Conditions, Loops, and switch Combine branches and loops in a small classification program.
- Lesson 1 challenge FizzBuzz Print Fizz, Buzz, or FizzBuzz for numbers from 1 through 15.
3 Loops 2 lessons
- Lesson 3 challenges Loops: for, while and do-while Repeat work with for, while and do-while loops, plus break and continue.
- Lesson 1 challenge Multiplication Table Print a multiplication table for one number.
4 Strings and text 3 lessons
- Lesson 2 challenges Arrays and Strings Traverse fixed arrays and safely measure text.
- Lesson 3 challenges Strings in C and C++ Compare C character arrays with C++ std::string: length, joining, comparing and searching.
- Lesson 1 challenge Check a Palindrome Check whether a word reads the same in both directions.
5 Collections 2 lessons
- Lesson 1 challenge Sum Array Values Calculate the sum of all values in an array.
- Lesson 2 challenges Find the Largest Array Value Find the maximum value in an array.
6 Functions 3 lessons
- Lesson 2 challenges Functions and Parameter Passing Compare pass-by-value, pointers, and references.
- Lesson 2 challenges Check a Prime Number Determine whether an integer is prime.
- Lesson 2 challenges Recursion and the Call Stack Solve a problem by reducing it to a smaller instance.
7 Objects and classes 2 lessons
- Lesson 1 challenge struct in C and class in C++ Model related state and behavior.
- Lesson 1 challenge Pointers and Addresses Store an address, dereference it, and modify the original object.