Chapter Summary

What have you accomplished? On the practical side, you have seen how to develop a random-number generator and an integer-sorting program. In the process, you met getint() and sort() functions that you can use in other programs. On the educational side, you have learned some general principles and concepts useful in designing complex programs.

Programs should be designed rather than allowed to evolve through some random process of growth, trial, and error. You should think carefully about the form and content of input and output for a program. You should break the program into well-defined tasks and then write the code for these tasks separately, keeping in mind how they interface with one another. The idea is to achieve modularity. ...

Get C Primer Plus®, Third 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.