In C we have functions, not methods. Variables are not recursive because to have recursion needs an action and variable is state.
In general it can be used in place of a loop of repetition. Most of the time it should not. Leave the recursion for cases where it is more intuitive. Normal sequences work best in loops. It is possible to transform this loop into a recursive function, but do not do it without a reason to do so.
Take care to do a recursive function, that is, a function that calls itself, unconditionally. When she does this she goes to infinity and never goes back to the beginning. And if you've been in it, this site will happen here, or the stack overflow , which will break the memory exhaustion request that is being filled in the stack without being released at any time.
Recursion is the repetition of something. This is recursion:
Inprogrammingistocallaroutineinsideitself.
Youhavesomequestionsonthesiteaboutthetopic:
To understand recursion you need to understand recursion! Got it?
Anothertypicalexample: