Just the same way it does in any other programming language.
Since this smells heavily of your homework, I'll give you no code! But it's pretty simple:
Take a factorial as an example (it's not actually something you would implement with recursion becasu ethere are much better ways to work it out, but it is easy to explain and understand).
Factorial(N) = N * Factorial(N -1) while N > 1
So the definition of a Factorial uses a Foactorial to define itself - it refers to itself as part of it's definition. It uses
recursion
to define itself. That's why some
dictionary definitions[
^] of recursion consist of just the words: "see Recursion"
So when you write a function to calculate a factorial, you can write it as this:
int Factorial(int N)
1) If N <= 1, return 1
2) return N * Factorial(N - 1)