O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recap

User-defined functions are a good way to break up a programming project to allow functionality to be spread across modules. In software-engineering terms, this permits the programmer to reuse modules that might have functionality that can be shared across application projects and makes each source code module easier to maintain.

Each function should be prototyped before use and can take a number of parameters while also returning a value (or none at all—void). Be careful when altering the value of parameters that have been passed, as it will depend on whether the value (or variable) has been passed by value or reference.

Finally, you can use recursion as a special technique to solve otherwise complex programming problems that cannot be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required