C++ Tutorial

C++ Functions

Functions

Functions group reusable logic behind a name you can call anywhere.

int add(int a, int b) { return a + b; }
Try it Yourself
Run this CPP example in your local environment or course sandbox.