Statements in C are the basic building blocks of programs; each statement forms a complete unit of computational logic. There are many types of statements and they are made up of a wide variety of elements:
- Simple statements: End with ;. return 0; is a simple statement.
- Block statements: Begin with { and end with }. They contain and group other statements. Here, we represent them as { … }, where … represents one or more statements of any type of valid statement.
- Complex statements: On the other hand, these consist of a keyword and one or more block statements. main(){…} is a complex statement; it has the main keyword and other pre-defined elements, including a block statement. Complex statements include functions (which are covered in this chapter), control statements (covered in Chapter 6, Exploring Conditional Program Flow), and looping statements (covered in Chapter 7, Exploring Loops and Iteration...