Functions
Function definition, parameter/return types and parameter by reference (&).
Simple enough for a 5-year-old to understand
Functions and return
#include <iostream>using namespace std;int square(int x) { return x * x;}int main() { cout << square(5) << endl; return 0;}🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 17