Skip to main content

Introduction

Selection is the process of choosing between multiple pathways in a program. In this section, we have 3 examples of applying selection in different circumstances instead of the usual single example. In C there are 3 syntactic constructs that you can use to perform selection. The most important of which involves the if/else statement. We will only focus on this in this chapter. In a later chapter we will introduce the other constructs. It is not necessary to use them... they provide convenience under some circumstances. It is more important to know and understand the if/else construct (and their variations) instead and connect them to the problems we may wish to solve.