OpenStax CNX

You are here: Home » Content » Case Control Structure

About: Case Control Structure

Module by: Kenneth Leroy Busbee. E-mail the author

View the content: Case Control Structure


Name: Case Control Structure
ID: m19963
Language: English (en)
Summary: An introduction to the case control structure and how it is implemented using a switch within the C++ programming language.
Subject: Science and Technology
License: Creative Commons Attribution License CC-BY 3.0

Authors: Kenneth Leroy Busbee (
Copyright Holders: Kenneth Leroy Busbee (
Maintainers: Kenneth Leroy Busbee (

Latest version: 1.4 (history)
First publication date: Mar 7, 2009 4:33 pm -0600
Last revision to module: Apr 5, 2010 1:09 pm -0500


PDF: m19963_1.4.pdf PDF file, for viewing content offline and printing. Learn more.
XML: m19963_1.4.cnxml XML that defines the structure and contents of the module, minus any included media files. Can be reimported in the editing interface. Learn more.

Version History

Version: 1.4 Apr 5, 2010 1:09 pm -0500 by Kenneth Leroy Busbee
Added an example that shows C++ source code for a case structure using characters.

Version: 1.3 Jan 15, 2010 3:33 pm -0600 by Kenneth Leroy Busbee
Added Google Analytics.

Version: 1.2 Apr 29, 2009 5:24 pm -0500 by Kenneth Leroy Busbee
Repaired for printing.

Version: 1.1 Mar 7, 2009 4:48 pm -0600 by Kenneth Leroy Busbee
Initial Module. 

How to Reuse and Attribute This Content

If you derive a copy of this content using a OpenStax-CNX account and publish your version, proper attribution of the original work will be automatically done for you.

If you reuse this work elsewhere, in order to comply with the attribution requirements of the license (CC-BY 3.0), you must include

  • the authors' names: Kenneth Busbee
  • the title of the work: Case Control Structure
  • the OpenStax-CNX URL where the work can be found:

See the citation section below for examples you can copy.

How to Cite and Attribute This Content

The following citation styles comply with the attribution requirements for the license (CC-BY 3.0) of this work:

American Chemical Society (ACS) Style Guide:

Busbee, K. Case Control Structure, OpenStax-CNX Web site., Apr 5, 2010.

American Medical Assocation (AMA) Manual of Style:

Busbee K. Case Control Structure [OpenStax-CNX Web site]. April 5, 2010. Available at:

American Psychological Assocation (APA) Publication Manual:

Busbee, K. (2010, April 5). Case Control Structure. Retrieved from the OpenStax-CNX Web site:

Chicago Manual of Style (Bibliography):

Busbee, Kenneth. "Case Control Structure." OpenStax-CNX. April 5, 2010.

Chicago Manual of Style (Note):

Kenneth Busbee, "Case Control Structure," OpenStax-CNX, April 5, 2010,

Chicago Manual of Style (Reference, in Author-Date style):

Busbee, K. 2010. Case Control Structure. OpenStax-CNX, April 5, 2010.

Modern Languages Association (MLA) Style Manual:

Busbee, Kenneth. Case Control Structure. OpenStax-CNX. 5 Apr. 2010 <>.