17 Modular Programming
So far we’ve been working with small, simple one-file programs, which is fine if all you’re going to do is write sample programs for a book. In the real world, however, you’re probably going to encounter programs with more than 50 lines in them.
The Linux kernel has 33,000 files and 28 million lines of code (and those numbers are increasing as you are reading this). You can’t deal with that amount of information without organizing it by dividing up the code into modules.
A module ideally is a single file containing a collection of data and functions that does one thing well with minimum interaction with other modules. ...
Get Bare Metal C 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.