7. Working with Functions

Behind all well-written programs in the C programming language lies the same fundamental element—the function. You’ve used functions in every program that you’ve encountered so far. The printf() and scanf() routines are examples of functions. Indeed, each and every program also uses a function called main(). You may be wondering, “What’s the big deal about functions?” When you start breaking down the your programming task into functions, your code will be easier to write, read, understand, debug, modify, and maintain. Obviously, anything that can accomplish all of these things is worthy of a bit of fanfare. As a result this is a chapter packed with important information, including

Understanding the basics of functions. ...

Get Programming in C, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.