Fork diagrams for teaching selection in CS I

Amruth N. Kumar · 1996

We propose a fork diagram as a visual representation of the algorithm for binary selection. Among other things, fork diagrams can be used to teach students how to write correctly nested if-else statements, analyze nested selection code, appreciate the problem of dangling else, and understand short circuit evaluation of conditions with boolean operators (and and or). We have used C code to illustrate concepts, although fork diagrams can be used for any high level language.

Read the paper · More papers on PaperTik