Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

The GNU C Programming Tutorial - Recursion summary

Node:Recursion summary, Next:, Previous:Controlled recursion with data structures, Up:Recursion



Recursion summary

Recursion can be a powerful programming technique, especially when dealing with mathematical functions such as factorialisation that lend themselves naturally to recursion, or with self-similar data structures. There is a major disadvantage to recursion, however, and that is the amount of memory required to make it work. Do not forget that the program stack grows each time a function call is made. If a function calls itself too many times, your program will run out of memory and crash. Recursive programming can also be difficult; runaway recursion is a common error. Therefore, be judicious in your use of recursion.

 
 
  Published under free license. Design by Interspire