Chapter 2: Understanding Program Structure
A C program, as in most programming languages, consists of a sequence of small, individual pieces of computational work called statements, which can form larger building blocks called functions, which are then compiled into a single program.
In the previous chapter, we learned about the basic development process. While understanding the process is fundamental, programming is principally about solving problems. This chapter will introduce one of the most important aspects of solving problems in any programming language: the ability to break a problem into smaller parts and then focus on solving each smaller problem. You can then use those parts as necessary to combine them into a complete program/solution. This is done by creating and using functions. As we examine these programming elements throughout this chapter, we will expand on the main()
function, which we encountered in the previous chapter.
The following topics will be covered...