Chapter 6. Making Decisions
IN CHAPTER 5, “PROGRAM LOOPING,” YOU LEARNED that one of the fundamental properties of a computer is its capability to repetitively execute a sequence of instructions. But another fundamental property lies in its capability to make decisions. You saw how these decision-making powers were used in the execution of the various looping statements to determine when to terminate the program loop. Without such capabilities, you would never be able to “get out” of a program loop and would end up executing the same sequence of statements over and over again, theoretically forever (which is why such a program loop is called an infinite loop).
The C programming language also provides several other decision-making constructs, which ...
Get Programming in C, 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.