O'Reilly logo

C Primer Plus, Fifth Edition by Stephen Prata

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

CHAPTER 9FUNCTIONS

You will learn about the following in this chapter:

• Keyword:

return

• Operators:

* (unary) & (unary)

• Functions and how to define them

• How to use arguments and return values

• How to use pointer variables as function arguments

• Function types

• ANSI C prototypes

• Recursion

How do you organize a program? C’s design philosophy is to use functions as building blocks. You’ve already relied on the standard C library for functions such as printf(), scanf(), getchar(), putchar(), and strlen(). Now you’re ready for a more active role—creating your own functions. You’ve previewed several aspects of that process in earlier chapters, and this chapter consolidates your earlier information and expands on it.

Reviewing Functions ...

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