The following C example tests the variable KEY1 and performs functions based on the results. For an example of how the case statement was used in an actual program, see event loop.
Bruns, William J., Jr., and Julie H. Hertenstein. "Statements of Cash Flows: Three Examples." Harvard Business School Case 193-103, February 1993. (Revised November ...